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)
2 answers
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!
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.
Log in to answer this question.
You can simulate random reads from a genome using randomreads.sh from bbtools. The resulting reads can be converted to .sra using sra-toolkit.
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.