You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract barcodes (sample and UMI) from read names #22
This feature is not available yet. I'm working on some major upgrades to splitcode this month, and I'll be sure to add this in in the next week or two.
If I then try to "re-extract" using extract syntax, I oddly extract into the original read as if the sample indexes are being prepended after any extractions occur.
Activity
Yenaled commentedon Aug 1, 2024
This feature is not available yet. I'm working on some major upgrades to splitcode this month, and I'll be sure to add this in in the next week or two.
Yenaled commentedon Jan 5, 2025
@nh13 Sorry, am very late haha, but I finally got around to adding the feature (along with many other features) to the newest version of splitcode:
https://splitcode.readthedocs.io/en/latest/extracting_from_names.html
Test it a bit and it seems to work.
Still updating the documentation a bit.
clintval commentedon Sep 14, 2025
I tried this but couldn't get it to work for my use case.
I have conventional FASTQ files from Illumina in which the UMI and sample index(es) are in the read name and comment:
@<instrument>:<run number>:<flowcell ID>:<lane>:<tile>:<x-pos>:<y-pos>:<UMI> <read>:<is filtered>:<control number>:<index>I am trying to extract the UMI (8th-field of name) and sample ID (4th-field of comment) to
RXandBCSAM tags.Importantly, the UMI can be
-delimited.An example would be:
Where
ACGT-TTTTis the UMI andATCCC+ATCGare the sample indexes.When I try to extract this information with splitcode, I get only the sample indexes re-appended back to the read:
$ splitcode \ --out-bam \ --pipe \ --from-name '0,0,0,::;0,0,0,::+' \ "test.fastq" \ | samtools view A01000:460:XXXXXX:1:2101:10004:10081:ACGT-TTTT 1:N:ATCCC+ATCG 12 * 0 0 * * 0 0 ATCCCATCGGGGGAGAGAGCGATAGACATA KKKKKKKKKJJJJJJJJJJJJJJJJJJJJJIf I then try to "re-extract" using extract syntax, I oddly extract into the original read as if the sample indexes are being prepended after any extractions occur.
splitcode \ --out-bam \ --pipe \ --from-name '0,0,0,::;0,0,0,::+' \ --extract '0:0<umi1[9]>' \ --x-names \ "test.fastq" \ | samtools view A01000:460:XXXXXX:1:2101:10004:10081:ACGT-TTTT 1:N:ATCCC+ATCG 12 * 0 0 * * 0 0 ATCCCATCGGGGGAGAGAGCGATAGACATA KKKKKKKKKJJJJJJJJJJJJJJJJJJJJJ RX:Z:GGGGAGAGA