PoreSignalExtractor is a modular Python pipeline designed to extract raw picoampere (pA) signal from Oxford Nanopore Technologies (ONT) POD5 files and map it to genomic coordinates.
Supports 4 different extraction modes, depending on the upstream mapping/basecalling tool used:
moves: Uses Dorado's implicit alignment (viamvandtstags in the BAM file).unc-ref: Usesuncalled4 convert --eventalign-outTSV mapping after ref-based resquiggling.unc-self: Usesuncalled4 convert --eventalign-outTSV mapping after self resquiggling.f5c-self: Usesf5c resquiggleTSV mapping after self resquiggling.
The pipeline is executed via the run_extract.py entry point, followed by the desired extraction subcommand.
Extracts signal using Dorado basecaller's implicit alignment via mv and ts tags. Parallelizes across genomic chunks.
python run_extract.py moves \
--bam mapped_reads.bam \
--pod5 /path/to/pod5_dir/ \
--output out_moves.tsv \
--ref genome.fasta \
--threads 16 \
--bed target_regions.bedExtracts signal using the TSV generated by uncalled4 convert --eventalign-out after reference-based resquiggling.
python run_extract.py unc-ref \
--map uncalled4_eventalign.tsv \
--pod5 /path/to/pod5_dir/ \
--output out_uncref.tsv \
--threads 16 \
--bed target_regions.bed
Extracts signal using the TSV generated by uncalled4 convert --eventalign-out after read-based resquiggling.
python run_extract.py unc-self \
--bam uncalled4_self.bam \
--self-tsv uncalled_eventalign_self.tsv \
--pod5 /path/to/pod5_dir/ \
--output out_uncself.tsv \
--bed target_regions.bed \
--threads 16Extracts signal using the TSV file generated by f5c resquiggle.
python run_extract.py f5c-self \
--bam f5c_mapped.bam \
--fasta genome.fasta \
--pod5 /path/to/pod5_dir/ \
--output out_f5c.tsv \
--bed target_regions.bed \
--threads 16All modules output a standardized TSV file. The structure is designed to be easily parsed.
The output columns are as follows:
| Column | Description |
|---|---|
read_id |
The unique UUID of the Nanopore read. |
contig |
Reference chromosome or contig (e.g., chr1). |
position |
0-based genomic coordinate of the aligned signal. |
ref_kmer |
Reference sequence context (K-mer) at this position. Will be N or . if not applicable. |
read_kmer |
Read sequence context (K-mer) at this position. Will be N or . if not applicable. |
samples_pA |
Comma-separated list of calibrated raw signal samples (in picoamperes). |