Difference between revisions of "Python code created by Shim"
From Crop Genomics Lab.
Sangrea Shim (Talk | contribs) |
Sangrea Shim (Talk | contribs) |
||
Line 27: | Line 27: | ||
location: 63server:/home/kev8305/pythonShim/[annotation]phytozome_annot.py | location: 63server:/home/kev8305/pythonShim/[annotation]phytozome_annot.py | ||
mannual: python [annotation]phytozome_annot.py --help | mannual: python [annotation]phytozome_annot.py --help | ||
+ | caution: not compatible with other plant species annotaion(only in Gmax) |
Revision as of 05:54, 28 March 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
determine variation type from three files: fasta, gff3, vcf(generated by samtools pipeline)
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)