Back to index

python-biopython  1.60
Functions | Variables
Proux_et_al_2002_Figure_6 Namespace Reference

Functions

def get_feature

Variables

string name = "Proux Fig 6"
tuple A_rec = SeqIO.read("NC_002703.gbk", "gb")
tuple B_rec = SeqIO.read("AF323668.gbk", "gb")
tuple C_rec = SeqIO.read("NC_003212.gbk", "gb")
tuple records = dict((rec.name, rec) for rec in [A_rec, B_rec, C_rec])
list A_colors = [red]
list B_colors = [red]
list C_colors = [grey]
list A_vs_B
list B_vs_C
tuple gd_diagram = GenomeDiagram.Diagram(name)
dictionary feature_sets = {}
int max_len = 0
tuple gd_track_for_features
list features_X = records[X]
list features_Y = records[Y]
list set_X = feature_sets[X]
list set_Y = feature_sets[Y]
tuple color = colors.linearlyInterpolatedColor(colors.white, colors.firebrick, 0, 100, score)
 border = colors.lightgrey
tuple f_x = get_feature(features_X, x)
tuple F_x
tuple f_y = get_feature(features_Y, y)
tuple F_y
list gd_feature_set = feature_sets[record.name]
int i = 0
string label_position = "start"
int label_size = 6
int start = 0

Detailed Description

GenomeDiagram script to mimic Proux et al 2002 Figure 6

You can use the Entrez module to download the 3 required GenBank files

This is an extended version of the example in the Biopython Tutorial
which produces a GenomeDiagram figure close to Proux et al 2002 Figure 6.

See http://dx.doi.org/10.1128/JB.184.21.6026-6036.2002

Function Documentation

def Proux_et_al_2002_Figure_6.get_feature (   features,
  id,
  tags = ["locus_tag",
  gene 
)
Search list of SeqFeature objects for an identifier under the given tags.

Definition at line 99 of file Proux_et_al_2002_Figure_6.py.

00099 
00100 def get_feature(features, id, tags=["locus_tag", "gene"]):
00101     """Search list of SeqFeature objects for an identifier under the given tags."""
00102     for f in features:
00103         for key in tags:
00104             #tag may not be present in this feature
00105             for x in f.qualifiers.get(key, []):
00106                 if x == id:
00107                      return f
00108     raise KeyError(id)


Variable Documentation

Definition at line 38 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.A_rec = SeqIO.read("NC_002703.gbk", "gb")

Definition at line 29 of file Proux_et_al_2002_Figure_6.py.

Initial value:
00001 [
00002     (99, "Tuc2009_01", "int"),
00003     (33, "Tuc2009_03", "orf4"),
00004     (94, "Tuc2009_05", "orf6"),
00005     (100, "Tuc2009_06", "orf7"),
00006     (97, "Tuc2009_07", "orf8"),
00007     (98, "Tuc2009_08", "orf9"),
00008     (98, "Tuc2009_09", "orf10"),
00009     (100, "Tuc2009_10", "orf12"),
00010     (100, "Tuc2009_11", "orf13"),
00011     (94, "Tuc2009_12", "orf14"),
00012     (87, "Tuc2009_13", "orf15"),
00013     (94, "Tuc2009_14", "orf16"),
00014     (94, "Tuc2009_15", "orf17"),
00015     (88, "Tuc2009_17", "rusA"),
00016     (91, "Tuc2009_18", "orf20"),
00017     (93, "Tuc2009_19", "orf22"),
00018     (71, "Tuc2009_20", "orf23"),
00019     (51, "Tuc2009_22", "orf27"),
00020     (97, "Tuc2009_23", "orf28"),
00021     (88, "Tuc2009_24", "orf29"),
00022     (26, "Tuc2009_26", "orf38"),
00023     (19, "Tuc2009_46", "orf52"),
00024     (77, "Tuc2009_48", "orf54"),
00025     (91, "Tuc2009_49", "orf55"),
00026     (95, "Tuc2009_52", "orf60"), 
00027 ]

Definition at line 52 of file Proux_et_al_2002_Figure_6.py.

Definition at line 41 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.B_rec = SeqIO.read("AF323668.gbk", "gb")

Definition at line 30 of file Proux_et_al_2002_Figure_6.py.

Initial value:
00001 [
00002     (42, "orf39", "lin2581"),
00003     (31, "orf40", "lin2580"),
00004     (49, "orf41", "lin2579"), #terL
00005     (54, "orf42", "lin2578"), #portal
00006     (55, "orf43", "lin2577"), #protease
00007     (33, "orf44", "lin2576"), #mhp
00008     (51, "orf46", "lin2575"),
00009     (33, "orf47", "lin2574"),
00010     (40, "orf48", "lin2573"),
00011     (25, "orf49", "lin2572"),
00012     (50, "orf50", "lin2571"),
00013     (48, "orf51", "lin2570"),
00014     (24, "orf52", "lin2568"),
00015     (30, "orf53", "lin2567"),
00016     (28, "orf54", "lin2566"),
00017 ]

Definition at line 81 of file Proux_et_al_2002_Figure_6.py.

Definition at line 134 of file Proux_et_al_2002_Figure_6.py.

Definition at line 43 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.C_rec = SeqIO.read("NC_003212.gbk", "gb")

Definition at line 31 of file Proux_et_al_2002_Figure_6.py.

list Proux_et_al_2002_Figure_6.color = colors.linearlyInterpolatedColor(colors.white, colors.firebrick, 0, 100, score)

Definition at line 133 of file Proux_et_al_2002_Figure_6.py.

Definition at line 135 of file Proux_et_al_2002_Figure_6.py.

Initial value:
00001 set_X.add_feature(SeqFeature(FeatureLocation(f_x.location.start, f_x.location.end, strand=0)),
00002                                 color=color, border=border)

Definition at line 136 of file Proux_et_al_2002_Figure_6.py.

Definition at line 138 of file Proux_et_al_2002_Figure_6.py.

Initial value:
00001 set_Y.add_feature(SeqFeature(FeatureLocation(f_y.location.start,f_y.location.end, strand=0)),
00002                                 color=color, border=border)

Definition at line 139 of file Proux_et_al_2002_Figure_6.py.

Definition at line 110 of file Proux_et_al_2002_Figure_6.py.

Definition at line 128 of file Proux_et_al_2002_Figure_6.py.

Definition at line 129 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.gd_diagram = GenomeDiagram.Diagram(name)

Definition at line 109 of file Proux_et_al_2002_Figure_6.py.

Definition at line 145 of file Proux_et_al_2002_Figure_6.py.

Initial value:
00001 gd_diagram.new_track(5-2*i,
00002                             name=record.name,
00003                             greytrack=True,
00004                             start=0, end=len(record))

Definition at line 117 of file Proux_et_al_2002_Figure_6.py.

Definition at line 147 of file Proux_et_al_2002_Figure_6.py.

Definition at line 155 of file Proux_et_al_2002_Figure_6.py.

Definition at line 156 of file Proux_et_al_2002_Figure_6.py.

Definition at line 111 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.name = "Proux Fig 6"

Definition at line 22 of file Proux_et_al_2002_Figure_6.py.

tuple Proux_et_al_2002_Figure_6.records = dict((rec.name, rec) for rec in [A_rec, B_rec, C_rec])

Definition at line 32 of file Proux_et_al_2002_Figure_6.py.

Definition at line 130 of file Proux_et_al_2002_Figure_6.py.

Definition at line 131 of file Proux_et_al_2002_Figure_6.py.

Definition at line 160 of file Proux_et_al_2002_Figure_6.py.