Feature request: extract umi's from header in fastqToBam step
Nobody has claimed this yet.
- Dominant language
- Nextflow
- Stars
- 29
- Forks
- 16
- Avg merge
- 5d 36m
- Merged PRs (30d)
- 1
Description
Description of feature
fgbio's FastqToBam supports the option --extract-umis-from-read-names true/ -n true to extract umis from the readnames. Although the pipeline is at the moment not able to receive the extra config info in the samplesheet. This both can be solved by autodetection of the said parameter before running FastqToBam.
My suggestion is something like this:
args_to_append=''
if python3 -c 'import sys,re;sys.exit(not re.fullmatch(r"^[ATCGN]+(\+[ATCGN]+)?$",open(sys.argv[1]).readline().split()[-2].split(":")[-1]))' <(zcat example.fastq.gz|head -n 1); then
args_to_append='--extract-umis-from-read-names true'
fi
This should support current illumina format and maybe also sra format.
Background info
Illuminas spec for fastq files allows encoding of UMI sequences in the header (using wikipedia fastq record header example updated for current illumina spec):
@EAS139:136:FC706VJ:2:2104:15343:197393:AATCG+AATCG 1:Y:18:ATCACG
@SEQUENCER:RUN:FLOWCELL:LANE:COORDINATE:COORDINATE:COORDINATE:UMI+UMI PAIR:PF:EVENNUMBER:INDEX
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 locating the fastqToBam step and the samplesheet configuration path. Inspect how the first read from an example.fastq.gz header is parsed, including the current Illumina format and possible SRA format, then verify that the completed pipeline detects header UMIs and passes fgbio's extraction option to FastqToBam.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- bioinformatics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100