Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

variant

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

variant

annotate variant

pipPyPI
Version
0.0.98
Maintainers
1

Python pakcage for genomic variant analysis

Pypi Releases Downloads

How to install?

pip install variant

How to use?

🧬 variant motif subcommand can fetch motif sequence around given site.

 Usage: variant motif [OPTIONS]

 Fetch genomic motif.

╭─ Options ─────────────────────────────────────────────────────────────────╮
│    --input        -i  TEXT  Input position file.                          │
│    --output       -o  TEXT  Output annotation file.                       │
│ *  --fasta        -f  TEXT  reference fasta file. [required]              │
│    --npad         -n  TEXT  Number of padding base to call motif. If you  │
│                             want to set different left and right pads,    │
│                             use comma to separate them. (eg. 2,3)         │
│    --padding      -p  TEXT  Padding base to use for motif. 'N' by default │
│                             but can be set to any single letter           │
│    --with-header  -H        With header line in input file.               │
│    --columns      -c  TEXT  Sets columns for site info.                   │
│                             (Chrom,Pos,Strand)                            │
│                             [default: 1,2,3]                              │
│    --to-upper     -u        Convert motif to upper case.                  │
│    --wrap-site    -w        Wrap motif site.                              │
│    --help         -h        Show this message and exit.                   │
╰───────────────────────────────────────────────────────────────────────────╯

demo:

I would like to get the 2 bases before the given sites, and 3 bases after the given sites, meanwhile, wrap the give sites with bracket. Moreover, the strand information should be taken into account.

use -n 2,3 -w

🧫 variant effect subcommand can infer the effect of a mutation

 Usage: variant effect [OPTIONS]

 Annotation genomic variant effect.

╭─ Options ────────────────────────────────────────────────────────────────╮
│ --input                 -i  TEXT     Input position file.                │
│ --output                -o  TEXT     Output annotation file              │
│ --reference             -r  TEXT     reference species                   │
│ --reference-gtf             TEXT     Customized reference gtf file.      │
│ --reference-transcript      TEXT     Customized reference transcript     │
│                                      fasta file.                         │
│ --reference-protein         TEXT     Customized reference protein fasta  │
│                                      file.                               │
│ --release               -e  INTEGER  ensembl release                     │
│ --strandness            -s           Use strand infomation or not?       │
│ --pU-mode               -u           Make rRNA, tRNA, snoRNA into top    │
│                                      priority.                           │
│ --npad                  -n  INTEGER  Number of padding base to call      │
│                                      motif.                              │
│ --all-effects           -a           Output all effects.                 │
│ --with-header           -H           With header line in input file.     │
│ --columns               -c  TEXT     Sets columns for site info.         │
│                                      (Chrom,Pos,Strand,Ref,Alt)          │
│                                      [default: 1,2,3,4,5]                │
│ --help                  -h           Show this message and exit.         │
╰──────────────────────────────────────────────────────────────────────────╯

demo:

Store the following table in file (sites.tsv).

ChromPositionStrandRefAlt
chr1230703034-CT
chr1269353439+AT
chr1423645352+GT
chr2215361150-AT
chr284906537+CT
chr2239319077-TA
chr2239319095-TA
chr2239319098-TA

Run command:

variant-effect -i sites.tsv -H -r human -e 108 -t RNA -H -c 1,2,3
  • -i specify the input file
  • -H means the file is with header line, and the first row will be skipped;
  • -r use the specific genome, default is human
  • -e specify the Ensembl release version
  • -c means only use some of the columns in the input file. default will use the first 5 columns.

You will have this output

ChromPositionStrandRefAltmut_typegene_typegene_namegene_postranscript_nametranscript_postranscript_motifcoding_poscodon_refaa_posaa_refdistance2splice
chr1230703034-CTThreePrimeUTRprotein_codingENSG00000135744(AGT)42543ENST00000680041(AGT-208)1753TGTGTCACCCCCAGTCTCCCANoneNoneNoneNone295
chr1269353439+ATThreePrimeUTRprotein_codingENSG00000090382(LYZ)5059ENST00000261267(LYZ-201)695TAGAACTAATACTGGTGAAAANoneNoneNoneNone286
chr1423645352+GTThreePrimeUTRprotein_codingENSG00000100867(DHRS2)15238ENST00000344777(DHRS2-202)1391CTGCCATTCTGCCAGACTAGCNoneNoneNoneNone210
chr2215361150-ATThreePrimeUTRprotein_codingENSG00000115414(FN1)74924ENST00000323926(FN1-201)8012GGCCCGCAATACTGTAGGAACNoneNoneNoneNone476
chr284906537+CTThreePrimeUTRprotein_codingENSG00000034510(TMSB10)882ENST00000233143(TMSB10-201)327CCTGGGCACTCCGCGCCGATGNoneNoneNoneNone148
chr2239319077-TAIntronicprotein_codingENSG00000100316(RPL3)1313ENST00000216146(RPL3-201)NoneNoneNoneNoneNoneNoneNone
chr2239319095-TAIntronicprotein_codingENSG00000100316(RPL3)1295ENST00000216146(RPL3-201)NoneNoneNoneNoneNoneNoneNone
chr2239319098-TAIntronicprotein_codingENSG00000100316(RPL3)1292ENST00000216146(RPL3-201)NoneNoneNoneNoneNoneNoneNone

🧫 variant coordinate subcommand can mapping chrom name and positions between different reference coordinate

 Usage: variant coordinate [OPTIONS]

 Fetch genomic motif.

╭─ Options ───────────────────────────────────────────────────────────────────╮
│ --input              -i  TEXT  Input position file.                         │
│ --output             -o  TEXT  Output annotation file.                      │
│ --reference-mapping  -m  TEXT  Mapping file for chrom name, first column is │
│                                chrom in the input, second column is chrom   │
│                                in the reference db (sep by tab)             │
│ --buildin-mapping    -M  TEXT  Build-in mapping for chrom name: U2E (UCSC   │
│                                to Ensembl), E2U (Ensembl to UCSC)           │
│ --with-header        -H        With header line in input file.              │
│ --columns            -c  TEXT  Sets columns for site info. (Chrom)          │
│                                [default: 1]                                 │
│ --help               -h        Show this message and exit.                  │
╰─────────────────────────────────────────────────────────────────────────────╯

⏳⏳⏳ more functions will be supported in the future

TODO:

Keywords

bioinformatics

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts