UMI '--rename' regex/utility
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 587
- Forks
- 144
- Avg merge
- 2h 37m
- Merged PRs (30d)
- 1
Description
Hi cutadapt devs,
I want to use cutadapt --rename to extract the meaningful portion of the UMI to the read name, but process the read to cut the entirety of the UMI. If this is currently possible can you let me know how I might change the below to achieve this? If it's not possible, can you add this as a feature in a future version? TIA!
A simple example is where I want to cut the first 7bp from R1 but only add the first 6bp to the read name;
cutadapt -u 7 --rename='{id} {comment} $(echo {cut_prefix} | cut -c1-6)'
What I'm hoping to get is;
1:2101:13928:1000 1:N:0:GTCGCCTT+AAA/ACTAATT NTTTAT
But what is returned is;
1:2101:13928:1000 1:N:0:GTCGCCTT+AAA/ACTAATT $(echo NTTTATT | cut -c1-6)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the cutadapt --rename option and how it expands {cut_prefix}, using the command and expected output in the issue as the behavioral example. Determine whether the rename utility can support selecting only part of the trimmed UMI, then add coverage for cutting 7 bases while naming only the first 6; done means the output matches the requested read name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100