Problem in reading .bam files (aligned to transcriptome) with ribofileCR function
0
1
Entering edit mode
bsad • 0
@bsad-15024
Last seen 5.1 years ago

Hi,

I'm a beginner in using R (so I apologise in advance if my question is really naive :) ) and I'm trying to use RiboSeqR to read my .bam files that come from the alignment of riboseq reads to the transcriptome (using bowtie). I've written this so far but it seems unable to access my files..Maybe I'm missing some really important bit of code?

source("https://bioconductor.org/biocLite.R")
biocLite("riboSeqR")
library(riboSeqR)
library(baySeq)
biocLite("Rsamtools")
library(Rsamtools)

humanFasta <- c ("~/Users/bsad/Documents/PhD/polysome_data/NGS_attempt_Footprints_only/[UCSC_Main_on_Human__refGene_(genome)].fasta", sep= "")

fastaCDS <- findCDS(fastaFile = humanFasta,
                   startCodon = c("ATG"),
                   stopCodon = c("TAG", "TAA", "TGA"))

ribofileCR <- c("~/Users/PATH_OF_MY_FILE/FILENAME1.bam", "~/Users/PATH_OF_MY_FILE/FILENAME2.bam", "~/Users/PATH_OF_MY_FILE/FILENAME3.bam", "~/Users/PATH_OF_MY_FILE/FILENAME4.bam")

riboDat <-readRibodata (ribofileCR, replicates = c("WT", "WT", "M", "M"))          
fCs <-frameCounting(riboDat, fastaCDS) 
fS <- readingFrame(rC, lengths = 25:35)

plotFS(fS)

Thanks in advance for any ideas,        Katerina

R riboseqr ribosome profiling • 1.1k views
ADD COMMENT
0
Entering edit mode

Usually the best strategy is to simplify your code to the bare minimum required to produce the error, and then to report (cut and paste) the error into the question. If you really wrote the commands as above, then a guess would be that your BAM files (not fasta files) are really not at ~/Users/PATH_OF_MY_FILE/FILENAME2.bam" but somewhere else on your system.

ADD REPLY
0
Entering edit mode

Hi, thank you very much for your reply, I typed these commands based on the RiboSeqR manual. The error message I'm getting is:

Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
  cannot open file '/Users/bsad/Documents/PhD/polysome_data/NGS_attempt_Footprints_only/[UCSC_Main_on_Human__refGene_(genome)].fasta': No such file or directory
+ stopCodon = c("TAG", "TAA", "TGA"))
Error in file(file, "r") : cannot open the connection
In addition: Warning message:
In file(file, "r") :
  cannot open file '/Users/bsad/Documents/PhD/polysome_data/NGS_attempt_Footprints_only/[UCSC_Main_on_Human__refGene_(genome)].fasta': No such file or directory

 

so that means there is an error in the path I'm giving?

 

 

 

ADD REPLY
1
Entering edit mode

Yes, the file path is somehow incorrect. You could try file.choose() to select the file that you are interested in, or file.exists('/Users/bsad/Documents/PhD/polysome_data/NGS_attempt_Footprints_only/[UCSC_Main_on_Human__refGene_(genome)].fasta') to test whether the file actually exists. Also, the use of [] is unusual in a file name; I don't know if this causes problems or not.

ADD REPLY

Login before adding your answer.

Traffic: 985 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