This is a test version of Biostars. For the public version, visit https://www.biostars.org.
File size on NCBI

I wonder if there is a way to get the file size from the NCBI server before downloading it. Also, I want to verify if the download of a BAM file was done properly by assessing that the file size is the same.

I used this command:

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

Is there a command that I could type to know this?

ncbi bam sam

1 answer

Depending on OS/storage the same file may show up with different sizes. Look at the number of reads SRA says this sample has and then compare your local copy.

You can browse and locate SRA files by using the ftp site at NCBI: ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/ That should allow you to gauge the size prior to download.

That's cool! I found that the .sra is 11.1GB but it does tell me what could be the BAM or SAM file. If I understand, there is not a way to verify this...

If you ultimately need the fastq reads then you could avoid sra altogether and get the fastq files directly from EBI-ENA. Just search with the SRA# to locate the record.

Is that using aspera or direct download from NCBI FTP?

That's from EBI-ENA. Is there a way that I can download the BAM file from the SRA file with Aspera?

Is that a pretty new dataset? It takes some time to see fastq's on EBI-ENA. I don't see any at the moment.

By "new" I can only say that the article was published this year. But the sequences are there since a long time!

Log in to answer this question.