This is a test version of Biostars. For the public version, visit https://www.biostars.org.
paired-end reads in BBMap randomreads.sh

Hi Biostars,

How to set the names of two output files (corresponding to each mate) in randomreads.sh script of BBMap package?

Help page specifies the out=filename option but when doing like that I get only I file containing both mates. Omitting that option produced two files but with random names.

Here is the command I use:

randomreads.sh ref=C_glabrata_CBS138_current_chromosomes.fasta out=reads.fastq length=75 reads=100 coverage=1 replacenoref=t simplenames=t seed=-1 paired=t metagenome=t

Thanks

P.S. How can I tag Brian Bushnell ?

randomreads bbmap

1 answer

You can do following with any additional options you need.

randomreads.sh ref=C_glabrata_CBS138_current_chromosomes.fasta out1=read1.fq out2=read2.fq paired=t addpairnum=t

If you use a single output name then the reads will be interleaved. You can separate them into two files using reformat.sh.

reformat.sh in=reads.fq out1=R1.fq out2=R2.fq

You had tagged @Brian the right way.

Thanks @genomax! Very helpful. Quite intuitive, but would be nice to include it in the manual.

Very helpful. Thanks! I was looking for a tool to generate pair-end reads from assembled genome. This helps a lot.

Log in to answer this question.