Enhancement request: trim but keep adaptor, --action=trimupto
See original GitHub issueI have a usecase in mind were rather than adapter or primer sequence which I want to match and remove, I have markers for a region of interest, and I want the (possibly inexactly matched) marker to be retained in the output.
Currently there are four action modes (correct as of cutadapt v2.8):
$ cutadapt -h | grep "\-\-action" -A 4
--action {trim,mask,lowercase,none}
What to do with found adapters. mask: replace with 'N'
characters; lowercase: convert to lowercase; none:
leave unchanged (useful with --discard-untrimmed).
Default: trim
Would you consider a new action mode, suggested name trimupto
(trim up to) or trimuntil
, as follows:
--action {trim,mask,lowercase,trimupto,none}
What to do with found adapters. mask: replace with 'N'
characters; lowercase: convert to lowercase; trimupto:
trim up to but retaining the adapter; none: leave
unchanged (useful with --discard-untrimmed).
Default: trim
Left adapter example:
$ for ACTION in trim mask lowercase none; do echo; echo "Using --action $ACTION:"; cutadapt -g AAAAAA -o - example.fasta --quiet --discard-untrimmed --action $ACTION; done
Using --action trim:
>example
XXXXXXXXXXXGGGGGGRRRRRRR
Using --action mask:
>example
NNNNNNNNNNNNNNXXXXXXXXXXXGGGGGGRRRRRRR
Using --action lowercase:
>example
llllllllaaaaaaXXXXXXXXXXXGGGGGGRRRRRRR
Using --action none:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXGGGGGGRRRRRRR
Proposed output:
Using --action trimupto:
>example
AAAAAAXXXXXXXXXXXGGGGGGRRRRRRR
Using left and right adapter:
$ for ACTION in trim mask lowercase none; do echo; echo "Using --action $ACTION:"; cutadapt -g AAAAAA...GGGGGG -o - example.fasta --quiet --discard-untrimmed --action $ACTION; done
Using --action trim:
>example
XXXXXXXXXXX
Using --action mask:
>example
NNNNNNNNNNNNNNXXXXXXXXXXXNNNNNNNNNNNNN
Using --action lowercase:
>example
llllllllaaaaaaXXXXXXXXXXXggggggrrrrrrr
Using --action none:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXGGGGGGRRRRRRR
Proposed output:
Using --action trimupto:
>example
AAAAAAXXXXXXXXXXXGGGGGG
Right adapter example:
$ for ACTION in trim mask lowercase none; do echo; echo "Using --action $ACTION:"; cutadapt -a GGGGGG -o - example.fasta --quiet --discard-untrimmed --action $ACTION; done
Using --action trim:
>example
LLLLLLLLAAAAAAXXXXXXXXXXX
Using --action mask:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXNNNNNNNNNNNNN
Using --action lowercase:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXggggggrrrrrrr
Using --action none:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXGGGGGGRRRRRRR
Proposed output:
Using --action trimupto:
>example
LLLLLLLLAAAAAAXXXXXXXXXXXGGGGGG
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Is Hi's Enhancement Request functionality available OOTB?
It seems that Hi's Enhancement Requests are FTASKs, but I can't seem to find them. Might they be available in a plugin by...
Read more >How to Monitor Enhancement Requests via My Oracle Support
The note answers commonly asked questions around Enhancements Requests (ERs):. - How do I monitor ER in My Oracle Support?
Read more >SCEIS Enhancement Requests
The Enhancement Request form is the first step in submitting a request for enhancements and modifications to the SCEIS System. Once the form...
Read more >OneStream Excel Enhancement Requests
Hello, Our Organization is currently going through a Planning implementation of OneStream. We have provided a list of enhancement requests to.
Read more >How do I find, view and support Enhancement Requests?
I keep seeing references to "Enhancement Requests", invitations to support them and going to "GTAC". (I don't know what GTAC is.) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot! It looks like this should do exactly what I was hoping for; I will try it out tomorrow!
On 2020-12-03 13:45, Marcel Martin wrote:
Lovely - I’m on leave right now, but hopefully I’ll get to try this out next month. Reading the documentation you’ve added, it should do what I was hoping for.