RNAseq workflow exception with Rsamtools
1
1
Entering edit mode
jmlCT ▴ 10
@jmlct-11501
Last seen 7.6 years ago

Hello,

Walking through this workflow I have encountered an exception using Rsamtools.  When using the command BamFileList(), to create a list of Bam files, I find it does not recognize the arg as being bam format (see the object 'filenames' containing paths to these below).  The traceback is included as well. I have looked this over for a while and I can't find the issue, which I am sure is obvious to the experienced user.

Thank you in advance for all help.

 

Using v3.3.1   1.68 build

> file.exists(filenames)
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
> filenames
[1] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039508_subset.bam"
[2] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039509_subset.bam"
[3] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039512_subset.bam"
[4] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039513_subset.bam"
[5] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039516_subset.bam"
[6] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039517_subset.bam"
[7] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039520_subset.bam"
[8] "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/airway/extdata/SRR1039521_subset.bam"
> bamfiles=BamFileList(filenames, yeildSize=2000000)
Error in validObject(.Object) : 
  invalid class “BamFileList” object: the 'listData' slot must be a list containing BamFile objects
> traceback()
12: stop(msg, ": ", errors, domain = NA)
11: validObject(.Object)
10: initialize(value, ...)
9: initialize(value, ...)
8: new(paste0(class, "List"), listData = list)
7: .Method(..., yieldSize = yieldSize, class = class)
6: eval(expr, envir, enclos)
5: eval(.dotsCall, env)
4: eval(.dotsCall, env)
3: standardGeneric(".RsamtoolsFileList")
2: .RsamtoolsFileList(..., yieldSize = yieldSize, class = "BamFile")
1: BamFileList(filenames, yeildSize = 2e+06)

 

rsamtools genomicalignments • 972 views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.5k
@mike-smith
Last seen 25 minutes ago
EMBL Heidelberg

How about if you swap the i and the e around and use the argument yieldSize = 2000000 ?

If that fixes it we can probably file it under a list of not very helpful error messages.

ADD COMMENT

Login before adding your answer.

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