ERROR in sam to bam conversion
1
0
Entering edit mode
4.4 years ago

Hi everyone, I' m trying to convert sra file from ncbi to bam with this command:

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

and I get this error :

2019-12-06T10:22:54 sam-dump.2.9.0 int: transfer incomplete while reading file within network system module - VCursorCellDataDirect( row#56918017 . idx#6 . READ ) INSDC_dna_text (ptr) failed [W::sam_read1] Parse error at line 56918017 [main_samview] truncated file.

Does anyone know what is the problem here?Can someone help me? Thanks

RNA-Seq sequencing • 794 views
ADD COMMENT
1
Entering edit mode

thanks, I solved this problem using 'prefetch'.

ADD REPLY
1
Entering edit mode
4.4 years ago
ATpoint 82k

It is not recommended to directly dump files, be it fastq or sam from NCBI. The connection is too unstable (in my experience) and this is exactly what you see. This file is most likely also raw (unaligned) data so there is little point in transformating it to BAM. Better get raw data and align yourself, see for download strategies:

Fast download of FASTQ files from the European Nucleotide Archive (ENA)

It includes downloading fastq files from ENA (which mirrors NCBI) or using the SRAtoolkit (prefetch/fastq-dump).

ADD COMMENT

Login before adding your answer.

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