Generate artificial reads
2
0
Entering edit mode
3.6 years ago

Hello,

i need to generate some artifical reads. randomsreads.sh from BBMap seems to be the right program for me.

I don't need random reads for my whole reference genome but for several thousand regions. So I wonder if there is better/faster way instead of first creating a separate ref file for every region? Maybe a new parameter for randomreads.sh for providing a bed file with the region (@Brian Bushnell :) )

fin swimmer

bbmap fastq randomreads • 851 views
ADD COMMENT
2
Entering edit mode
3.6 years ago
James Ashmore ★ 3.1k

You can do this with bedtools and wgsim:

# Generate FASTA file of regions    
bedtools getfasta -fi reference.fasta -bed regions.bed > regions.fasta

# Generate reads from FASTA file of regions
wgsim regions.fasta reads_1.fastq reads_2.fastq
ADD COMMENT
2
Entering edit mode

Why not go back to randomreads.sh after bedtools getfasta. OP is happy with it otherwise :-)

ADD REPLY
0
Entering edit mode

Good point, I'm not familiar with BBMap, either will work I guess

ADD REPLY
0
Entering edit mode

The combination with bedtools getfasta and randomreads.sh works perfect.

Thank you all.

fin swimmer

ADD REPLY
0
Entering edit mode
3.6 years ago
Joe 19k

Haven't tried it personally, but ART is used a lot in my lab for this:

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3278762/

Not sure if it will do a region-by-region thing, though you could probably simulate a genome and then work backwards throwing away the uncessary stuff with bedtools or similar.

ADD COMMENT

Login before adding your answer.

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