This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Making reference fasta file from aligned sam file or bed file

I have cancer panel data targeting 212 amplicons. I want to use a reference genome that only contains sequences from these 212 amolicons for mapping instead of whole human genome. I think I can create a bed file from amplicon coordinates and fetch sequences. Is that right approach becuase many amplicons have different locations on same chromosome and repeated (or duplicated)chromosome numbers in bed files create a problem in indexing and sorting (which has been the case when I tried to do this). Can I also have my new reference from the mapped files (sam or bam which are obtained after aligning to whole genome) only for these 212 regions?

I hope it’s not confusing; Kindly help with suggestions.

thanks in advance.

rna-seq

1 answer

Is that right approach becuase many amplicons have different locations on same chromosome and repeated (or duplicated)chromosome numbers in bed files create a problem in indexing and sorting (which has been the case when I tried to do this).

This is not the right approach and I advice against this as:

  • Your new 'genome' will be difficult to work with downstream as you'll need to lift over all data sources that are in reference genome coordinates (e.g hg19, hg38) into your own coordinate system.

  • You'll map off-target reads to your amplicons. If your wet lab protocol is not perfect, you're going to have off-target reads. This will increase your false positive rate as you'll been calling variants in your cancer genes that are actually from a related pseudo-gene. Illumina's TrueSeq Custom Amplicon panel even includes an expected off-target region in their Targets section for exactly this regions. You should not ignore these expected off-target regions.

If you really still want to do this, I recommend masking your source genome. If you mask the off-target regions of your genome by replacing the sequence with Ns, you will at least have the same coordinate system.

And beside all the good point about why you shouldn't do this, the always recurring question: Why do you want to do this?

I'm a bit afraid you are asking in XY-Question.

fin swimmer

Oh That makes sense. Thanks. Any suggestions on masking?

Log in to answer this question.