Difference between revisions of "Python code created by Shim"
From Crop Genomics Lab.
Sangrea Shim (Talk | contribs) |
Sangrea Shim (Talk | contribs) |
||
(6 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Using class as a high speed searchable variation''' | |
class ClassName: | class ClassName: | ||
Line 7: | Line 7: | ||
... | ... | ||
− | + | Import the files include this class | |
− | + | Then, input data which you'd like to input to an instance like this way | |
− | ClassName(Data4variation1,Data4variation2,,,,) | + | ClassName(Data4variation1,Data4variation2,,,,) |
+ | |||
+ | If you want to search the instance which you've made, firstly, you have to state variation. | ||
+ | However, creating variation repeatedly is not possible in python. | ||
+ | So, dictionary used as a searching table. | ||
+ | |||
+ | Gene_dict = {'Glyma01g01110':1,'Glyma02g01230':2,,,,} | ||
+ | instance_list = [ ClassName('Glyma01g01110',,,,),ClassName('Glyma02g01230',,,,,),,,,] | ||
+ | |||
+ | '''Variation typing code''' | ||
+ | |||
+ | annotate genomic features of variation included in variant calling format | ||
+ | location: 63server:/home/kev8305/pythonShim/[SNP]variation_type.py | ||
+ | mannual: python [SNP]variation_type.py (reference.fa) (reference.gff3) (vcf_from_reference_seqeuncing) | ||
+ | |||
+ | count variation for several types of genomic feature | ||
+ | location: 63server:/home/kev8305/pythonShim/[SNP]vcf_2_count.py | ||
+ | mannual: python [SNP]vcf_2_count.py (vcf_file_annotated_by_variation_type.py) | ||
+ | |||
+ | '''Useful annotation code for one who is not familiar with python''' | ||
+ | |||
+ | location: 63server:/home/kev8305/pythonShim/[annotation]phytozome_annot.py | ||
+ | mannual: python [annotation]phytozome_annot.py --help | ||
+ | caution: not compatible with other plant species annotaion(only in Gmax) |
Latest revision as of 08:29, 11 April 2014
Using class as a high speed searchable variation
class ClassName: def __init__(self,variation1,variation2,,,,): self.variation1=variation1 self.variation2=variation2 ...
Import the files include this class Then, input data which you'd like to input to an instance like this way
ClassName(Data4variation1,Data4variation2,,,,)
If you want to search the instance which you've made, firstly, you have to state variation. However, creating variation repeatedly is not possible in python. So, dictionary used as a searching table.
Gene_dict = {'Glyma01g01110':1,'Glyma02g01230':2,,,,} instance_list = [ ClassName('Glyma01g01110',,,,),ClassName('Glyma02g01230',,,,,),,,,]
Variation typing code
annotate genomic features of variation included in variant calling format
location: 63server:/home/kev8305/pythonShim/[SNP]variation_type.py mannual: python [SNP]variation_type.py (reference.fa) (reference.gff3) (vcf_from_reference_seqeuncing)
count variation for several types of genomic feature
location: 63server:/home/kev8305/pythonShim/[SNP]vcf_2_count.py mannual: python [SNP]vcf_2_count.py (vcf_file_annotated_by_variation_type.py)
Useful annotation code for one who is not familiar with python
location: 63server:/home/kev8305/pythonShim/[annotation]phytozome_annot.py mannual: python [annotation]phytozome_annot.py --help caution: not compatible with other plant species annotaion(only in Gmax)