Code documentation

scripts.defineAndCountClades module

scripts.defineAndCountClades.annotateNwk_nextstrain(t, j_d, trait, sampDate_d, sampPangolin_d, geneToIndex, indexToGene)[source]
scripts.defineAndCountClades.annotateNwk_treetime(t, nodeTraits_d, trait, geneBoundry_d, sampDate_d, sampPangolin_d, geneToIndex, indexToGene)[source]
scripts.defineAndCountClades.assignCladeToLin(assignment_old_d, heiarchy_old_d, clade_old_s)[source]

mode of Pangolin linage of tips withen clade are appended to clade names

scripts.defineAndCountClades.assignToNucMut(t, mutList, logNotes_open)[source]

input: annotated tree (t) and list of nucliotide mut (mutList) to look for output: assignment_d: key: leaf node name; value: clade heierarchy (heiarchy_d: key:child clade; value:parent clade )

scripts.defineAndCountClades.assignToSpecAA(t, mutList, logNotes_open, geneToIndex)[source]

input: annotated tree (t) and aa mut (mutList) to look for output: assignment_d: key: leaf node name; value: clade heierarchy (heiarchy_d: key:child clade; value:parent clade )

scripts.defineAndCountClades.assignToTraits(t, ofInterst_l=[])[source]

input: annotated tree (t) Not currntly functional: if ofInterst_l is not empty only initialize when node has trait in least output: assignment_d: key: leaf node name; value: clade heierarchy (heiarchy_d: key:child clade; value:parent clade )

scripts.defineAndCountClades.countAbudanceFromNames_byWeek(assignment_d, clade_s, startDate, endDate, delta, tipLog_name)[source]

counts total number of tips withen each clade, for each time interval (delta) between startDate and endDate

scripts.defineAndCountClades.main()[source]
scripts.defineAndCountClades.readInMeta(inMeta_name, pangolin)[source]

Input: ete3 tree with node names that have ‘trait’ of clade specified in j_d Outputs: tree with trait appened to node names

scripts.defineAndCountClades.treetimeToTraits_d(parseT, traitOfInterstKey)[source]

scripts.drawMuller module

class scripts.drawMuller.Clade(name, parent_name)[source]

Bases: object

class scripts.drawMuller.CladeSnapshot(clade, snapshot, abundance)[source]

Bases: object

sumUpDescendants()[source]
class scripts.drawMuller.Snapshot(time, date)[source]

Bases: object

scripts.drawMuller.defineChildBoundries(time, scaleFactor, parentCladeSnap, y1_parent, y2_parent)[source]

time is the number defining the time of interest parentCladeSnap is pointer to snapshotClade object which has boundries of” y1_parent is top of clade boundries, y1_parent is bottom of clade boundries

updates

scripts.drawMuller.drawWrapper(outFolder, outPrefix, root_clades_l, scaleTime, times_l, maxY, minTime, labelPosition, xlabel, timeToDate_d)[source]
scripts.drawMuller.extractCord_draw(clades_l, img, scaleTime, x_labelCord_l, y_labelCord_l, label_l, times_l, minTime, labelPosition)[source]
scripts.drawMuller.main()[source]
scripts.drawMuller.makeColor()[source]
scripts.drawMuller.removeSmallClades(abundances_d, heiarchy_d, minCount)[source]

removes clade from abudances and heiarchiy that have sum less than minCount heiarchy_d: key:child clade; value:parent clade abundances_d: key: week; value: dict of key:clade; value: count

scripts.drawMuller.textheight(text, fontsize)[source]
scripts.drawMuller.textwidth(text, fontsize)[source]
scripts.drawMuller.timeToX(time, scaleTime, minTime)[source]

scripts.mutationLinages_report module

scripts.mutationLinages_report.main()[source]

scripts.parseFastaNames module

scripts.parseFastaNames.main()[source]

Input: fasta with sequence id that has bar*isodate suffix Output: metadat file that can be input into nextstrain (as downloaded 2021-02-01) fasta with *bar to “_”