Manipulate linked-read FASTQ and BAM files
Get all the barcodes from the input file(s)
Sort records by barcode rather than name or position
djinn sam stats summarizes each molecule of a coordinate-sorted SAM/BAM file: number of reads, start, end,
inferred length, aligned bp, inferred insert length and coverage. With -d DISTANCE, reads that share a barcode
are split into separate molecules (BARCODE, BARCODE-1, ...) when they are more than DISTANCE bases apart,
using the same splitting as djinn sam deconvolve. A barcode is valid when its VX tag says so, or, when there is
no VX tag, when the barcode itself is valid. djinn fq stats does the same kind of summary for a FASTQ file:
reads, reads with a barcode, valid and invalid barcodes, and how many barcodes were bad at each position
(haplotagging segment A00, stLFR part 0, TELLseq base N).
Different molecules can share a barcode. djinn sam deconvolve -d DISTANCE tells them apart by where their reads
sit: when a barcode's reads are more than DISTANCE bases apart, the later ones get the barcode with a hyphenated
number on the end (BARCODE, BARCODE-1, BARCODE-2, ...). Everything else in every record is left alone, and a
summary (molecules before and after, and how many barcodes were split how many times) goes to stderr. Chain it into
stats to get per-molecule numbers: djinn sam deconvolve -d 50000 in.bam | djinn sam stats - (or just
djinn sam stats -d 50000 in.bam, which splits internally).
- separate linked reads from singletons
- omit invalid barcodes
Djinn converts between linked-read data formats. You can convert between formats in terms of FASTQ type or barcode style. It supports:
- 10X
- haplotagging
- stLFR
- TELLseq
- standard
NCBI strips out sequence headers from FASTQ submissions, so it would be best to convert your linked-read
FASTQ data into an unaligned BAM file, with the linked-read barcode stored in the BX tag.
Djinn provides a convenience function to convert to (or from) this format, although you can just use samtools import too.
