variation
random transformation of sequences, including deletions, additions and mutations.
usage
SeqBox variation
usage: SeqBox variation [-h] [-out OUT] [-od OUT_DIR] [-vi VIN] [-vr VREPLACE]
[-vd VDICT]
optional arguments:
-h, --help show this help message and exit
-out OUT, --out_file OUT
sequence out file with TSV format
-od OUT_DIR, --out_dir OUT_DIR
out direction
-vi VIN, --vinfile VIN
-vr VREPLACE, --vreplace VREPLACE
replace base number, like: 1,2,3
-vd VDICT, --vdict VDICT
variation dict, like: '1:A-2:T-3:C-4:G'
API
1 |
|
CLI
The main parameters are base variation length(-vr
or --vreplace
), input file(-vi
or --vinfile
), and variation encoding(-vd
or --vdict
).
1 |
|
input: test.tsv
#seq
ACCATTAGCACCAACAGGCAAGCTCCTGCACGGTA
GTGCAGGCCCAACTTTCCCCACCTATAGGCTACGG
GACCGGGCGGGACTTTCGCCCAATCATCACATACC
AACCGGTAGTCGATGAGCGCTCATTAACACGAAGC
GTTCTGGTCATTTATCCTCCCTCAGGTACGGATTT
TTGCCGCTCAATTGAAAGGTACTGCCAGGAGTGTC
AGGCCAGAACGGATATACTAGTTGCTCCAACCTGA
ATTGACAGCAGGCGCAAGACATGCCCTAAGCCCTA
GTAACTATCCCGAGTCGACGCAGATTGTGCTTCGG
CGTAGCCTAGGCGTGGGATTATAACTCTCCGGTAA
output: test_variation.tsv
seq_raw seq_var1 seq_var2 seq_var3
ACCATTAGCACCAACAGGCAAGCTCCTGCACGGTA ACCATAGCACCAACAGGCAAGCTCCTGCACGGTA ACCATTAGCACCTACAGGCAGCTCCTGCACGGTA ACCATTAGCACCAACAGGCAAGCTCCCGCCGGA
GTGCAGGCCCAACTTTCCCCACCTATAGGCTACGG GTGCAGGCCCAACTTTCCCCACCTATAGGATACGG GTCAAGGCCCAACTTTCCCCACCTATAGGCTACGG GTGCAGCCAACTTTCCCACCTATAGGCTACGG
GACCGGGCGGGACTTTCGCCCAATCATCACATACC GACCGCGGCGGGACTTTCGCCCAATCATCACATACC GACCGGGCGGGACTTTCCCCAATGGATCACATACC GACCGGGCGGGACTTTCGGCCAATCATCACATACA
AACCGGTAGTCGATGAGCGCTCATTAACACGAAGC AACCGGTAGTCGATAGCGCTCATTAACACGAAGC AACCGGTAGTATGATGAGCGCTCATTAACACTAAGC AACCGGTGTCGATGAGCGCTTCATTAACACGAAGC
GTTCTGGTCATTTATCCTCCCTCAGGTACGGATTT GTTCTGGTCATTTATCCTCCCTCAGGTACGGATTA GTTCTGGTCATTTATCTCCCTCAGGTACGGATT GTTCTGGTCATTATCCTCTTGTTCAGGTACGGATTT
TTGCCGCTCAATTGAAAGGTACTGCCAGGAGTGTC TTGCCGCTCAATTGAAAGGTACTGCCAGGAGTGTC TTGCCGCTCAATTAAAGGTACTGCAGGAGTGTC TTGCCGCTCAATTGTGGAAGGTACTGCCAGGCGTGTC
AGGCCAGAACGGATATACTAGTTGCTCCAACCTGA AGGCCAGAACGGATATACTAGTTGCTCCAACCTTA AGGCCAGAACGCTATAAAACTAGTTGCTCCAACCTGA AGGCACAACGGATATACTAGTGCTCCAACCTGA
ATTGACAGCAGGCGCAAGACATGCCCTAAGCCCTA ATTGACAGCAGGCGCAAACACATGCCCTAAGCCCTA ATTGACAGCAGGCGCAAAACATGCCCTAAGCCTA ATTGATGAGCAGGCGCAATACATGCCCTAGCCCTA
GTAACTATCCCGAGTCGACGCAGATTGTGCTTCGG GTAACTATCCCGAGTCGACGCAGATTGTGCTCGG GTAACTATCCCGAGTCACGCAGATTGGAGCTTCGG GTAACTATCCCGATCGACGCAGATTGTCCCTTCGG
CGTAGCCTAGGCGTGGGATTATAACTCTCCGGTAA CGTAGCCTAGGCGTGGGATATAACTCTCCGGTAA CGTAAGCCTAGGCGTGGGATATAACTCTCCGGTAA CGTAGCCGAAGCGTGGGATATAACTCTCCGGTAA
vdict
default variation dict: deletions, mutations, and additions, the ratio of the three mutation types is 1:1:1. Customize using parameters(-vd
or -vdict
), like: 0- ;00- ;1-A;2-T
.
1 | dict_var = {"0":"", "00":"","000":"","0000":"","00000":"","00001":"","00002":"","00003":"","00004":"","00005":"","00006":"","00007":"","00008":"","00009":"","000010":"","000011":"", |