readRNAMultipleAlignmen - filepath
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
I am not quite understand the way to specify the filepath in "readRNAMultipleAlignmen" function. Step 1: I try to read the file(Testing13Seq.aln) by specify the true path of my file, but it result in error(origMAlign1). Step 2: I move my file to the exdata folder in the Biostring package, but I still tried to read the data with the true path. Again it result in error(origMAlign2). Step 3: The data remain at exactly the same path as in Step 2. Rather call the the file with fullpath, I call through "system.file" function. Now the data can be read (origMAlign3). However, the pathfile in Step 2 and Step 3 are exactly the same path. So my question is, do I need to move my data to the BioString package everytime I need to read it, then call the file via system.file function. Why cant I just type the fullpath, then read the file? -- output of sessionInfo(): > origMAlign1 <- readRNAMultipleAlignment("D:/Research/Chivalai/DENGUE /Data/FASTA/Testing13Seq.aln",format="clustal") Error in .Call2("new_XStringSet_from_CHARACTER", ans_class, ans_elementType, : key 84 (char 'T') not in lookup table > origMAlign2 <- readRNAMultipleAlignment(filepath ="C:/Users/C. Temiyasathit/Documents/R/win- library/3.1/Biostrings/extdata/Testing13Seq.aln",format="clustal") Error in .Call2("new_XStringSet_from_CHARACTER", ans_class, ans_elementType, : key 84 (char 'T') not in lookup table > origMAlign3 <- readDNAMultipleAlignment(filepath =system.file("extda ta","Testing13Seq.aln",package="Biostrings"),format="clustal") > origMAlign3 DNAMultipleAlignment with 13 rows and 11239 columns aln names [1] ---------------------------------------...----------------------- --------------- gi|31339329|gb|AB... [13] AGTTGTTAGTCTGTGTGGACCGACAAGGACAGTTCCGAA...----------------------- --------------- gi|148828520|gb|E... > filepath =system.file("extdata","Testing13Seq.aln",package="Biostrings") > filepath [1] "C:/Users/C. Temiyasathit/Documents/R/win- library/3.1/Biostrings/extdata/Testing13Seq.aln" -- Sent via the guest posting facility at bioconductor.org.
• 1.5k views
ADD COMMENT
0
Entering edit mode
Alyssa Frazee ▴ 210
@alyssa-frazee-6710
Last seen 4.1 years ago
San Francisco, CA, USA
Hi, My guess is that there is no problem with the path to your file and that you can put it wherever you want. (Usually if it is a path problem, there is an error like "unable to open file" or "file not found"). Instead, the problem seems to be the choice of read function: looks like you used the "readRNAMultipleAlignment" function in steps 1 and 2, but "readDNAMultipleAlignment" in step 3. The "readRNA" functions don't handle "T"s in the input file (because RNA sequences contain "U"s instead), and it looks like you're working with DNA. Hope this helps, Alyssa On Sun, Aug 24, 2014 at 11:07 AM, KoRR [guest] <guest at="" bioconductor.org=""> wrote: > I am not quite understand the way to specify the filepath in > "readRNAMultipleAlignmen" function. > > Step 1: I try to read the file(Testing13Seq.aln) by specify the true path > of my file, but it result in error(origMAlign1). > > Step 2: I move my file to the exdata folder in the Biostring package, but > I still tried to read the data with the true path. Again it result in > error(origMAlign2). > > Step 3: The data remain at exactly the same path as in Step 2. Rather call > the the file with fullpath, I call through "system.file" function. Now the > data can be read (origMAlign3). > > However, the pathfile in Step 2 and Step 3 are exactly the same path. So > my question is, do I need to move my data to the BioString package > everytime I need to read it, then call the file via system.file function. > Why cant I just type the fullpath, then read the file? > > -- output of sessionInfo(): > > > origMAlign1 <- > readRNAMultipleAlignment("D:/Research/Chivalai/DENGUE/Data/FASTA/Tes ting13Seq.aln",format="clustal") > Error in .Call2("new_XStringSet_from_CHARACTER", ans_class, > ans_elementType, : > key 84 (char 'T') not in lookup table > > > origMAlign2 <- readRNAMultipleAlignment(filepath ="C:/Users/C. > Temiyasathit/Documents/R/win- library/3.1/Biostrings/extdata/Testing13Seq.aln",format="clustal") > Error in .Call2("new_XStringSet_from_CHARACTER", ans_class, > ans_elementType, : > key 84 (char 'T') not in lookup table > > > origMAlign3 <- readDNAMultipleAlignment(filepath > =system.file("extdata","Testing13Seq.aln",package="Biostrings"),form at="clustal") > > origMAlign3 > DNAMultipleAlignment with 13 rows and 11239 columns aln > names > [1] > ---------------------------------------...-------------------------- ------------ > gi|31339329|gb|AB... > [13] > AGTTGTTAGTCTGTGTGGACCGACAAGGACAGTTCCGAA...-------------------------- ------------ > gi|148828520|gb|E... > > > > > filepath =system.file("extdata","Testing13Seq.aln",package="Biostrings") > > filepath > [1] "C:/Users/C. > Temiyasathit/Documents/R/win- library/3.1/Biostrings/extdata/Testing13Seq.aln" > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 525 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6