jsrc
Python library for bioinformatics and scientific computing.
Installation
Install from PyPI:
pip install jsrc
From source (development):
git clone https://github.com/imjiaoyuan/jsrc.git
cd jsrc
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Run jsrc --help to get started.
For detailed usage, see the Documentation. 中文文档请参阅 文档。
Quick Start
jsrc --help
jsrc <module> --help
jsrc <module> <subcommand> --help
Examples:
jsrc seq --help
jsrc analyze phylo --help
jsrc genome stats --help
Paths like
test/...in the examples below are illustrative — substitute your own input files.
Module Overview
| module | focus | typical use |
|---|---|---|
seq |
Sequence extraction, translation, k-mer, sliding window | jsrc seq extract ... |
genome |
Genome statistics, feature detection, comparative/evolutionary analysis | jsrc genome stats ... |
plot |
Gene/exon/chromosome/domain and other plots | jsrc plot gene ... |
analyze |
Phylogeny, motif, consensus, SNP/INDEL, QC | jsrc analyze phylo ... |
grn |
GRN conversion, centrality, build packaging, local serve | jsrc grn build ... |
Error Output Conventions
- Input and validation failures are reported in unified format:
Error: <message>. - Missing files, invalid parameters, and incompatible inputs follow the same style across subcommands.
- Use
--helpon the target module/subcommand first when argument combinations are unclear.
A Glance of jsrc's Functions
grn module
Generate and launch a 1000-gene random network viewer:
jsrc grn net2json -i test/grn/network.tsv -o test/grn/grn.json
jsrc grn anno2json -i test/grn/annotation.tsv -o test/grn/annotation.json
jsrc grn build -d test/grn/public -g test/grn/grn.json -n test/grn/annotation.json -z test/grn/grn-viewer.zip -a -t 200
jsrc grn serve -d test/grn/public -g test/grn/public/json/grn.json -n test/grn/public/json/annotation.json -p 8000 -a -t 200
Centrality ranking (top 5):
jsrc grn centrality -i test/grn/network.tsv --top 5
| rank | node | in_degree | out_degree | total_degree |
|---|---|---|---|---|
| 1 | GENE_0504 | 24.14 | 34.97 | 59.12 |
| 2 | GENE_0785 | 26.37 | 29.51 | 55.88 |
| 3 | GENE_0165 | 42.81 | 12.21 | 55.01 |
| 4 | GENE_0394 | 14.82 | 33.04 | 47.86 |
| 5 | GENE_0427 | 36.50 | 10.60 | 47.10 |
genome module
jsrc genome stats -fa genome.fa
jsrc genome cpg -fa genome.fa --window 200 --min-len 500
jsrc genome ani -fa1 genome1.fa -fa2 genome2.fa -k 21
jsrc genome codon -fa cds.fa --cai reference.fa --enc
Genome statistics: N50 2,450,000 bp, L50 3, GC 45.2%, 15 gaps.
CpG islands: 42 islands found, longest 1,250 bp.
ANI: 96.8% (Jaccard 0.85, Mash distance 0.032).
Codon usage: CAI 0.78, ENC 52.3, top codon CTG (RSCU 1.85).
seq module
jsrc seq extract -fa test/seq/test.fa -gff test/seq/test.gff -ids test/seq/ids.txt -o test/seq/extracted.fa -feature gene -match ID
Extract sequences by gene ID from FASTA+GFF, rename via CSV map, run QC stats, k-mer counting, and sliding-window analysis.
QC: 2 sequences, 268 bp total, GC 56.7%, N50 160.
k-mer (k=3): top ATC (40), TCG (40), CGA (39).
analyze module
jsrc analyze msa_consensus -fa test/analyze/aln.fa --json
jsrc analyze snpindel -fa test/analyze/aln.fa
jsrc analyze motif -fa test/analyze/aln.fa -o test/analyze/motif_out -minw 3 -maxw 5 -nmotifs 3
jsrc analyze phylo -fa test/analyze/aln.fa -o test/analyze/tree.nwk
- Consensus:
ATGCTAGCTAGCTAGCTAGC, mean conservation 0.983 - SNP: seq1 vs seq3 has 1 SNP (alignment score 19/20)
- Motif (top):
GCT(12),CTA(12),TAG(12) - Phylogeny:
(seq1:0.00000,seq2:0.00000,seq3:0.05000)Inner1:0.00000;
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsrc-0.4.1.tar.gz.
File metadata
- Download URL: jsrc-0.4.1.tar.gz
- Upload date:
- Size: 93.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3abb83fcb58a2c26500a98d65beda59602f920427b9d398ac6cf547949418d53
|
|
| MD5 |
7e922bb30b0b88b5ec5f5f5bee417f66
|
|
| BLAKE2b-256 |
e6cc6f49ad14d81d4f818992dd039334b1678334c951261b19c2f786643ce584
|
Provenance
The following attestation bundles were made for jsrc-0.4.1.tar.gz:
Publisher:
publish.yml on imjiaoyuan/jsrc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsrc-0.4.1.tar.gz -
Subject digest:
3abb83fcb58a2c26500a98d65beda59602f920427b9d398ac6cf547949418d53 - Sigstore transparency entry: 2770797902
- Sigstore integration time:
-
Permalink:
imjiaoyuan/jsrc@a175373219771180dbdc869fe907aaade306136c -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/imjiaoyuan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a175373219771180dbdc869fe907aaade306136c -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsrc-0.4.1-py3-none-any.whl.
File metadata
- Download URL: jsrc-0.4.1-py3-none-any.whl
- Upload date:
- Size: 94.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
472c9a22a4cdf293b0a74a4d6038dda14467ef6fc419df163b38eb4450266ecf
|
|
| MD5 |
038772d349dd4c96f1dacbebc6bb3730
|
|
| BLAKE2b-256 |
005a772ca668e698dcbe1b960323c397f80c4aabc1a83982f81c1d304dace66d
|
Provenance
The following attestation bundles were made for jsrc-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on imjiaoyuan/jsrc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsrc-0.4.1-py3-none-any.whl -
Subject digest:
472c9a22a4cdf293b0a74a4d6038dda14467ef6fc419df163b38eb4450266ecf - Sigstore transparency entry: 2770797992
- Sigstore integration time:
-
Permalink:
imjiaoyuan/jsrc@a175373219771180dbdc869fe907aaade306136c -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/imjiaoyuan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a175373219771180dbdc869fe907aaade306136c -
Trigger Event:
push
-
Statement type: