This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mapping contigs & scaffolds to ref genome?

Noob here,

I'm trying to map a file of contigs and scaffolds onto a reference genome but bowtie keeps outputting the same error:

bowtie2 -f -x wmel_genome -U ~/Aa23/ref/assemblies/wMelPopPGYP.finalassembly-alt.fasta

terminate called after throwing an instance of 'std::bad_alloc'

what(): std::bad_alloc

(ERR): bowtie2-align died with signal 6 (ABRT)

I edited my file from a non-fasta so that every contig/scaffold sequence began with ">scaffold/contig-name". There are over 15 separated sequences in the file. Some of the sequences contain "n" character I'm guessing for uncertain/missing nucleotides.

mapping assembly bowtie2

4 answers

Bowtie2 is a short read mapper and is not suitable for such application, BLAT or MUMMER would be more suitable in such cases.

I find bwa mem is useful for this case and have used it many times. Bowtie2 is not suitable.

I would use samtools, not picard, for the SAM-> bam conversion, as Picard gets messed up by very long MD strings from long contigs

You can also try gmap, I find that works quite well.

Minimap2 should also be able to do this job.

Log in to answer this question.