Home - kfuku52/cdskit GitHub Wiki

cdskit wiki

cdskit is a command-line toolkit for frame-aware processing, validation, visualization, and localization analysis of protein-coding sequences.

Setting up

After installation, run cdskit --help for the command list and cdskit COMMAND --help for current options and defaults.

Long options use snake_case. Older compact spellings are accepted for backward compatibility but print a deprecation warning. Structured TSV reports are UTF-8, tab-delimited, rectangular, and LF-terminated. Multi-section reports contain schema_version and section columns. See the 0.24 migration guide for old-to-new mappings.

codonstats --mode both is an exception: it prints two separately headed tables. Use --mode summary or --mode usage for a single TSV table. longestcds is a deprecated alias of longestorf.

This wiki describes the current master source; packaged releases can lag behind it. Check cdskit --version when comparing installed behavior. Page sources and images are also maintained in the repository's wiki/ directory; see documentation maintenance.

Localization models and licensing

The default ESM2 + Light Attention model predicts ten subcellular locations from protein or CDS input. The prediction guide compares it with the optional integrated CNN and legacy targeting5 models, including their different dependencies and label meanings.

CDSKIT code and CDSKIT-trained model weights are MIT-licensed. Third-party software and source datasets retain their own license terms.

CDSKIT commands

  • accession2fasta: Retrieving fasta sequences from a list of GenBank accessions

  • aggregate: Extracting the longest sequences combined with a sequence name regex

  • backalign: Back-aligning CDS from unaligned CDS plus aligned proteins

  • backtrim: Back-translating a trimmed protein alignment

  • codonstats: Printing codon-aware per-sequence and aggregate codon-usage statistics

  • degeneracy: Extracting aligned 0/2/3/4-fold degenerate nucleotide positions

  • dnds: Batched pairwise YN00 dN/dS estimation from aligned CDS pairs

  • filter: Filtering CDS by sequence-level clean-codon fraction and quality rules

  • gapjust: Adjusting consecutive Ns to the fixed length

  • hammer: Removing less-occupied codon columns from a gappy alignment

  • intersection: Dropping non-overlapping sequence labels between two sequences files or between a sequence file and a gff file

  • label: Modifying sequence labels

  • longestorf: Finding the longest ORF by six-frame translation (+/- strands, 3 frames each)

  • localize: Predicting targeting peptide classes (noTP, SP, mTP, cTP, lTP) or compatible multi-label localization models from CDS or protein input

  • localize-learn: Training custom cdskit localize models from TSV or UniProt-derived labels

  • mask: Masking ambiguous and/or stop codons

  • maxalign: Removing sequences to maximize codon-based alignment area (MaxAlign)

  • pad: Making nucleotide sequences in-frame by head and tail paddings

  • parsegb: Converting the GenBank format

  • plot: Plotting aligned CDS clean-fraction summaries, codon-state maps, and nucleotide alignment views with consensus codon/AA and AA frequency logos

  • printseq: Print a subset of sequences with a regex

  • rmseq: Removing a subset of sequences by using a sequence name regex and by detecting problematic sequence characters

  • split: Splitting 1st, 2nd, and 3rd codon positions

  • stats: Printing sequence statistics or AMAS-compatible alignment summaries with --mode alignment

  • translate: Translating CDS nucleotide sequences to amino acids

  • trimcodon: Trimming aligned CDS codon columns by clean-codon fraction

  • validate: Validating aligned CDS quality and reporting issues

Citing CDSKIT

Report the CDSKIT version, commands/options, genetic code where applicable, and the accession/model/data versions used. Function pages list relevant method, software and dataset papers at the end. Cite only the components used; a shared task does not imply that CDSKIT implements another program's algorithm. Generic ID and sequence utilities have no separate method paper designated.

References

  • Fukushima K, Pollock DD (2023). Detecting macroevolutionary genotype–phenotype associations using error-corrected rates of protein convergence. Nature Ecology & Evolution 7:155–170. Paper — Published use of CDSKIT, including pad, mask, backtrim and hammer. This is not a methods reference for every function added since 2023.