This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sra-Pileup Question

I'm having trouble extracting a pileup file from an SRA using sra-pileup command. NCBI documentation only covers command line arguments for the tool and lacks any usage examples. Here's what I get:

$ linux/gcc/stat/x86_64/rel/bin/sra-pileup --version                               
linux/gcc/stat/x86_64/rel/bin/sra-pileup : 2.3.2

$ linux/gcc/stat/x86_64/rel/bin/sra-pileup ./SRR364089.sra
2013-11-02T14:27:10 sra-pileup.2.3.2 int: self invalid while opening within application support module - failed to process ./SRR364089.sra

The error message, self invalid while opening, looks completely cryptic. I've tried reading the source (available on GitHub), but couldn't find the place where the error is triggered. Any hints on what I'm doing wrong?

pileup

1 answer

If you take a look at the run browser for that sample it doesn't actually have alignment data. It's ridiculous, I know, but the error message you are receiving looks like an unhanded exception. sra-pileup requires alignment data.

Huh, interesting, sam-dump does produce some output for this sample.

$ sam-dump -r ./SRR364089.sra | head -n3                                                                                                                                                    
@HD VN:1.3
LAMARCK_3065:4:1:1239:2103    196    *    0    0    *    *    0    0    NATGAGTGAATGGTTGAAATTTTAATAGAAATTATATTNTTTTTGAACGGAGTATAAGGAAAAGGAATATTTTTGAGTTTGGGAGAGATCGGAAGCGCTC    ####################################################################################################
LAMARCK_3065:4:1:1086:2115    196    *    0    0    *    *    0    0    TTATTTTATTAAGTGTATAGTGGTATGTTATTGTAGTTNTATTTTGTTTTTTTTTAATAGTTAATGATATTGTATTAAAAATTTTTTAAATTTTTAANNN    HHHHHHHHHGHHHHHFHFFHEGGEGGGDDGHGHHHDDD#DDD=CBHHHHEHHHHGGFEHHEHGHHGFFGFGFCGDFFDFFHHHGHHHDFHFHH@H#####

Is there a way to check if a sample has alignment data using SRA toolkit?

If you'll notice in the SAM output, the third field (reference name) is *, meaning not mapped to any contig. To test whether your SRA archive has aligned data, you can run: vdb-dump SRR364089.sra | grep 'ALIGNMENT_COUNT'. I believe that archives with no aligned data will not have this field.

Log in to answer this question.