Question: Convert sra to bam file error handling
gravatar for c12i34
5.1 years ago by
United Kingdom
c12i3420 wrote:

Hi Guys,I am trying to convert some sra files into bam format. At the moment, I am using this command from sratoolkit

sam-dump SRR390728 | samtools view -bS - > SRR390728.bam

but unfortunately I got an error message like this: 

sam-dump.2.4.2 err: param invalid while validating file within file system module - content-size read from local file is invalid.

Having said that, i still get a bam file as output at the end. Can I ignore that error msg and continue with peak calling? Also how I can convert multiple sra files to bam in one go? Many thanks! 

next-gen software error • 4.7k views
ADD COMMENTlink modified 3.2 years ago by Biostar ♦♦ 20 • written 5.1 years ago by c12i3420

I do hope you took a look at this post: Sra Format Questions: How To Get A Sam File That Can Be Converted To Bam?

ADD REPLYlink written 5.1 years ago by RamRS25k
gravatar for gauravsingh.singh86
5.1 years ago by
United States
gauravsingh.singh8620 wrote:
sam-dump SRR390728.sra  > SRR390728.sam

Once you have your SAM file:

module load SAMTools
samtools view -b -S SRR390728.sam > SRR390728.bam
ADD COMMENTlink modified 5.1 years ago by Devon Ryan94k • written 5.1 years ago by gauravsingh.singh8620

Note that loading samtools as a module will be completely system dependent and often not required.

ADD REPLYlink written 5.1 years ago by Devon Ryan94k

What Devon said. module load samtools is only valid in shared environments. Also, OP is using the latest version of samtools so a direct conversion to BAM should not be the cause of the problem.

ADD REPLYlink modified 5.1 years ago • written 5.1 years ago by RamRS25k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1350 users visited in the last hour