question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clip primer sequences post alignment

See original GitHub issue

Hello,

we are doing targeted sequencing using a Qiagen Kit. During library prep the dna is fragmented and tagged with UMI and a universal primer sequence at one end of the strand. So for the enrichment only one specific primer per amplicon is needed.

I would like to clip the primer sequences after alignment. fgbio provides the tools TrimPrimers and ClipBam. The first one expect a pair of primers, where the second one clippes a fixed number of bases.

Qiagen provides a file like this:

chr3	178928203	1	AAAAGCTATTATATATACATAAGAGAGAAGGTTTGACTGCC
chr3	178928223	0	TCCATGCTTAGAGTTGGAGTTTGACTGGTTC
chr3	178928286	0	GATTGAAGAGCATGCCAATTGGTCTGTATCC

The first two columns describes the start position of the primer, the third whether the read is a forward (0) or reverse (1) primer and in the 5th column the sequence.

What I wish is a tools that takes the bam and the above tab separated text file as input and clippes (soft and/or hard) the primers from the reads after alignment. It should take care if the opposite strand overlaps the clipped region and clip those bases as well.

Could fgbio provide such a function?

Thanks!

fin swimmer

FYI: I asked for such a tool before on biostars.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nh13commented, Sep 30, 2019

I understand now. Let me see what I can do. It may be a little while as I have to prioritize client work but it shouldn’t be that hard.

0reactions
rspreafico-vircommented, Jun 1, 2020

@nh13 Sure thing, very understandable!

We are using TrimPrimers as recommended by your friends at Paragon Genomics. The current implementation works for our needs and for that kit without any modification.

This thread caught my attention as I can imagine such a flag being useful to extend the tool to remove primers for example from long, partially overlapping amplicons broken down with Nextera. In that case, only the two ends of each amplicon would require trimming, whereas all other “internal” fragments should not be trimmed.

Very ok for me to put this in back-burner. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clipping primer after alignment - Biostars
I have the position, the orientation and the sequence of the primers in the kit. Is anyone aware of tool that can clip...
Read more >
BAMClipper: removing primers from alignments to ... - Nature
Here we introduce BAMClipper that removes primer sequences after mapping original sequencing reads by soft-clipping SAM/BAM alignments.
Read more >
pTrimmer: An efficient tool to trim primers of multiplex deep ...
pTrimmer is designed to trim primer sequence from multiplex amplicon sequencing and target sequencing. It is highly sensitive and specific ...
Read more >
PrimerMiner tutorial: Making alignments with Geneious
We have downloaded and clustered the sequence data for our target organisms. ... PrimerMiner tutorial: Making alignments with Geneious.
Read more >
TrimPrimers | fgbio - Fulcrum Genomics
Paired end reads that map to a given amplicon position are trimmed so that the alignment no-longer includes the primer sequences. All other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found