Hi,

so this is a bit confusing.  I've been trying to reproduce it myself
over a local Windows network, but I cannot.  I did however locate a
potential problem where R incorrectly believes it does not have the
permission to read the file, which might be what you are experience.

Could you please try the following?  If you get an error, please
report what traceback() gives.

library("aroma.affymetrix");

# This should be the absolute pathname to the CDF file
pathname <- 
"//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/chipTypes/MoGene-1_0-st-v1/MoGene-1_0-st-v1,r3.cdf"

# Assert that the path is correct
stopifnot(isDirectory(dirname(pathname)));

# Get some file info
print(as.list(file.info(pathname)));

# Check file permissions
print(file.access(pathname, mode=0));
print(file.access(pathname, mode=1));
print(file.access(pathname, mode=2));
print(file.access(pathname, mode=4));

# Try to read the CDF reader using affxparser
hdr <- readCdfHeader(pathname);
str(hdr);

cdf <- AffymetrixCdfFile(pathname);
print(cdf);

pathname2 <- AffymetrixCdfFile$findByChipType("MoGene-1_0-st-v1",
tags="r3", verbose=-100);
print(pathname2);

print(as.list(file.info(pathname2)));

cdf <- AffymetrixCdfFile$byChipType("MoGene-1_0-st-v1", tags="r3",
verbose=-100);
print(pathname2);


/Henrik


On Wed, Nov 26, 2008 at 8:46 AM, pwhiteusa <[EMAIL PROTECTED]> wrote:
>
> Hi Henrik,
>
> This was the output this time around:
>
>> path2 <- filePath(path, "chipTypes", "MoGene-1_0-st-v1")
>> print(path2);
> [1] "//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/
> annotationData/chipTypes/MoGene-1_0-st-v1"
>> print(file.info(path2));
>
> size
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1    0
>
> isdir
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1  TRUE
>
> mode
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1  777
>
> mtime
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1 2008-11-20 12:45:36
>
> ctime
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1 2008-11-20 12:45:36
>
> atime
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1 2008-11-25 18:07:38
>
> exe
> //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
> chipTypes/MoGene-1_0-st-v1  no
>
>> print(list.files(path=path2));
> [1] "MoGene-1_0-st-v1,r3.cdf"
>
> Cheers,
>
> Peter
>
>
> On Nov 24, 2:59 pm, "Henrik Bengtsson" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> one typo by me, please retry with:
>>
>> path2 <- filePath(path, "chipTypes", "MoGene-1_0-st-v1");
>>
>> [I forgot 'chipTypes']
>>
>> /Henrik
>>
>> On Mon, Nov 24, 2008 at 11:56 AM, pwhiteusa <[EMAIL PROTECTED]> wrote:
>>
>> > The answers are dispersed below........
>>
>> >> > I just wanted to update you on the issue of creating Windows shortcuts
>> >> > to point to the correct directory.
>>
>> >> > So the CDF files I want to use is on a mapped network drive - it is
>> >> > mapped to my "P Drive":
>>
>> >> > P:\ANNOTATION\aromaAffymetrix\annotationData\chipTypes\HuGene-1_0-st-
>> >> > v1\HuGene-1_0-st-v1,r3.cdf
>>
>> >> > I created the following shortcut in my working experiment directory,
>> >> > "P:\EXPERIMENTS\NCHRI\TEST\CEL\annotationData.lnk", with the following
>> >> > in the Target box:
>>
>> >> > P:\ANNOTATION\aromaAffymetrix\annotationData
>>
>> >> Did you create that by "drag'n'drop' by a right clicking or did you
>> >> edit the "Target box" manually?  Always do the drag'n'drop, because
>> >> the property box of a Windows Shortcut does not show all internal
>> >> fields or the shortcut and editing it is not safe.
>>
>> > Yes, I used drag and drop. I just checked the Target box to confirm.
>>
>> >> > When I type in the command
>>
>> >> > cdf <- AffymetrixCdfFile$fromChipType("MoGene-1_0-st-v1",tags="r3")
>>
>> >> > it throws an error because it is unable to find the file. Displaying
>> >> > the path reveals:
>>
>> >> >> Arguments$getReadablePath("annotationData")
>> >> > [1] "//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/
>> >> > annotationData"
>>
>> >> What happens if you do:
>>
>> >> path <- Arguments$getReadablePath("annotationData");
>> >> print(list.files(path=path));
>>
>> > $ path
>> > [1] "//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/
>> > annotationData"
>> > $ print(list.files(path=path))
>> > [1] "chipTypes"
>>
>> >> path2 <- filePath(path, "MoGene-1_0-st-v1");
>> >> print(path2);
>> >> print(file.info(path2));
>> >> print(list.files(path=path2));
>>
>> > $ print(path2);
>> > [1] "//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/
>> > annotationData/MoGene-1_0-st-v1"
>> > $ print(file.info(path2));
>>
>> > size
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1   NA
>>
>> > isdir
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1    NA
>>
>> > mode
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1 <NA>
>>
>> > mtime
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1  <NA>
>>
>> > ctime
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1  <NA>
>>
>> > atime
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1  <NA>
>>
>> > exe
>> > //RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/annotationData/
>> > MoGene-1_0-st-v1 <NA>
>>
>> > $ print(list.files(path=path2));
>> > character(0)
>> > Warning message:
>> > In list.files(path = path2) :
>> >  list.files: '//RES2K3FS01/RESAffymetrix/ANNOTATION/aromaAffymetrix/
>> > annotationData/MoGene-1_0-st-v1' is not a readable directory
>>
>> >> > So it looks as though the issue is that "P:\" is being replaced by R
>> >> > with the actual name of the Network drive. If I copy the
>> >> > annotationData directory to my C:\ and create the shortcut to point
>> >> > there it works just fine, but the arguments command returns "C:\":
>>
>> >> >> Arguments$getReadablePath("annotationData")
>> >> > [1] "C:/annotationData"
>>
>> >> So, if I understand you correctly, you are saying that "shortcuting"
>> >> to another location on the local C: drive works, but when you try to
>> >> do the same for a drive unit (P:) mounted to a network drive, then you
>> >> do not get the drive unit path, but the network path.  Correct?
>>
>> > Yes, that's correct
>>
>> >> The Windows Shortcut file format is unfortunately not public and my
>> >> implementation relies on a reverse engineered description of it.  I
>> >> know there are multiple "paths" in the file and that I might have
>> >> update the code such that locally mounted paths are returned before
>> >> network drive paths.
>>
>> >> Could you please forward me the problematic windows shortcut file
>> >> (*.lnk) by doing the following:
>>
>> >> library("R.utils");
>> >> gzip("annotationData.lnk", remove=FALSE);
>>
>> >> That will create an annotationData.lnk.gz file, which you can email to
>> >> either the list or to me directly.
>>
>> > I'll e-mail to you directly.
>>
>> >> > If there is a way around it that's great, but if not I can live with
>> >> > just creating a copy of the annotation data on on my local machine.
>> >> > Thought I should post my experience in case others go through the
>> >> > same.
>>
>> >> We should be able to solve this one way or the other.
>>
>> >> /Henrik
>>
>> >> > Thanks,
>>
>> >> > Peter
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group.
To post to this group, send email to aroma-affymetrix@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/aroma-affymetrix?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to