NanoCount python API
Activate virtual environment
from NanoCount.NanoCount import NanoCount
from NanoCount.common import jhelp, head
Running NanoCount
Basic command
NanoCount (alignment_file="./data/aligned_reads.bam", count_file="./output/tx_counts.tsv")
head("./output/tx_counts.tsv")
Basic command without file writing and Dataframe output
nc = NanoCount (alignment_file="./data/aligned_reads.bam")
display(nc.count_df)
Adding extra transcripts information
extra_tx_info option adds a columns with the transcript lengths and also includes all the zero-coverage transcripts in the results nc = NanoCount (alignment_file="./data/aligned_reads.bam", extra_tx_info=True)
display(nc.count_df)
Relaxing the equivalence threshold
NanoCount (alignment_file="./data/aligned_reads.bam", count_file="./output/tx_counts.tsv", equivalent_threshold=0.8, extra_tx_info=True)
head("./output/tx_counts.tsv")
NanoCount help
jhelp(NanoCount)
NanoCount (alignment_file, count_file, min_read_length, min_query_fraction_aligned, equivalent_threshold, scoring_value, convergence_target, max_em_rounds, extra_tx_info, verbose, quiet)
Estimate abundance of transcripts using an EM
- alignment_file (required) [str]
BAM or SAM file containing aligned ONT dRNA-Seq reads including secondary and supplementary alignment
- count_file (default: "") [str]
Output file path where to write estimated counts (TSV format)
- min_read_length (default: 50) [int]
Minimal length of the read to be considered valid
- min_query_fraction_aligned (default: 0.5) [float]
Minimal fraction of the primary hit query aligned to consider the read valid
- equivalent_threshold (default: 0.9) [float]
Fraction of the alignment score or the alignment length of secondary hits compared to the primary hit to be considered valid hits
- scoring_value (default: alignment_score) [str]
Value to use for score thresholding of secondary hits either "alignment_score" or "alignment_length"
- convergence_target (default: 0.005) [float]
Convergence target value of the cummulative difference between abundance values of successive EM round to trigger the end of the EM loop.
- max_em_rounds (default: 100) [int]
Maximum number of EM rounds before triggering stop
- extra_tx_info (default: False) [bool]
Add transcripts length and zero coverage transcripts to the output file (required valid bam/sam header)
- verbose (default: False) [bool]
Increase verbosity for QC and debugging
- quiet (default: False) [bool]
Reduce verbosity