This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error running sam-dump

I'm downloading a BAM from the NCBI server. The thing is that I sometimes get an error message and sometimes not. Nothing change in my code. I just send the command at different times.

sam-dump SRR2937435 | samtools view -bS - > SRR2937435.bam
# I get a file that is ~950 MB 
# 2016-11-04T21:57:49 sam-dump.2.7 err: function unsupported while opening file within network system module - error with http open 'http:
# 2016-11-04T21:57:49 sam-dump.2.7 err: item not found while reading file - input object(s) not found

I found other people having the same problem but it seems that nobody knows why. Do you have any idea?

sam ncbi bam samtools

1 answer

This error will pop up when there is interception in connection to sra-download.ncbi.nlm.nih.gov by sam-dump. Once, the connection is successfully established, you will not see this error. Sometimes, you have to keep trying to execute sam-dump to establish secure connection to sra-download.ncbi.nlm.nih.gov. That is why, you get this error message sometimes.

By connection, do you mean my computer to the internet or a server error from NCBI? Is there a way that I get the error less frequently?

Log in to answer this question.