Samtools mpileup

Hi all!

I was trying to add a reference genome (built in) to the samtools mpileup but it appears there is none available. Has anyone seen this error before?

Emily

Welcome @Emily_Nielsen

You can toggle the menu to use the fasta from the history option instead. That would be the same custom genome fasta that you used for mapping.

This is the default option toggle on the form. You should be able to use the pull-down to find it again now.


Format may not matter when mapping but usually will with downstream tools. At least remove the description content from the > title lines, leaving only the identifiers. The identifiers should be what is in the SQ lines of the BAM file if you are not sure what those are.

  • How to → FAQ: How to use Custom Reference Genomes?

  • In this example BAM line, the part in bold is the sequence identifier.

    @SQ SN:chr2 LN:242193529

  • Then, in a fasta file, that same sequence identifier would look like this.

    >chr2

  • If instead you have something like this, then you’ll need to strip out the description content or the tool will probably fail with an odd reason.

    >chr2 anything after the first whitespace is description content


Hope this helps but let us know and we can follow up more with your example. Please see the banner of this forum for how to share your work for feedback. :slight_smile: