Need to create a small artificial SRA file for unit testing
2
1
Entering edit mode
4.8 years ago

Hi folks. I'm looking for a way to create an SRA file from an artificial fastq file for the purpose of unit testing a SRA file loader. The resultant SRA file should be small in order to minimize automatic testing time. (ie the fastq fill has only 10 reads).

The closest thing I've found are latf-load and fastq-loader.py in the NCBI toolkits, which generate sub-directory structures with various pieces of information. Is there any way to go from that to an SRA file (keeping it local to the machine)

sequencing sequence • 1.4k views
ADD COMMENT
0
Entering edit mode

You can simulate random reads from a genome using randomreads.sh from bbtools. The resulting reads can be converted to .sra using sra-toolkit.

ADD REPLY
0
Entering edit mode

Hi! Thanks very much for the reply! What I'm actually looking for is the procedure to make the sra conversion. I wasn't able to find it in the sra-toolkit.

ADD REPLY
1
Entering edit mode
4.8 years ago

My question was answered at seqanswers: after using latf-load to prepare the data, the SRA file is created by "kar".

Thanks again for your reply!

ADD COMMENT
0
Entering edit mode
6 months ago
morovatunc ▴ 560

I think whoever reads this should also thumbs up Sean McCorckles comment.

To explain below.

./sratoolkit.3.1.1-centos_linux64/bin/prefetch SRR14428673 --max-size 10T -o SRR14428673.sra # You download the SRA with prefetch.
./sratoolkit.3.1.1-centos_linux64/bin/fastq-dump -A SRR14428673 -N 1 -X 1000 --split-files # Get first 1000 reads. Edit 1000 to desired number of reads if you need higher number of reads.
./sratoolkit.3.1.1-centos_linux64/bin/latf-load -o ./test -1 SRR14428673_1.fastq -2 SRR14428673_2.fastq --quality PHRED_33 --no-readnames -a # generate a DB structure that is compatible (i have no idea why but just follow me)
./sratoolkit.3.1.1-centos_linux64/bin/kar --create test.sra --directory test/ # create the SRA object with kar comment. This is where my Sean was insturmental.

Good luck.

ADD COMMENT

Login before adding your answer.

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