pytransit.analysis package — TRANSIT v2.3.2 documentation

# pytransit.analysis package

## Submodules

## pytransit.analysis.base module

class `pytransit.analysis.base.` `AnalysisGUI`
  `Enable`()
  `GlobalDisable`()
  `GlobalEnable`()
  `GlobalHide`()
  `GlobalShow`()
  `Hide`()
  `Show`()
  `defineCheckBox`(panel, labelText='', widgetCheck=False, tooltipText='', widgetSize=None)
  `defineChoiceBox`(panel, labelText='', widgetChoice=[''], tooltipText='', labSize=None, widgetSize=None)
  `definePanel`(wxobj)
  `defineTextBox`(panel, labelText='', widgetText='', tooltipText='', labSize=None, widgetSize=None)

class `pytransit.analysis.base.` `AnalysisMethod`(short_name, long_name, short_desc, long_desc, output, annotation_path, wxobj=None)

  Basic class for analysis methods. Inherited by SingleMethod and ComparisonMethod.

  `Run`()
  `add_file`(path=None, filetype=None)
  `console_message`(text)
  `console_message_inplace`(text)
  `finish`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `fromconsole`()
  `print_members`()
  `progress_range`(count)
  `progress_update`(text, count)
  `status_message`(text, time=-1)
  `transit_error`(text)
  `transit_message`(text)
  `transit_message_inplace`(text)
  `transit_warning`(text)
  classmethod `usage_string`()

class `pytransit.analysis.base.` `DualConditionMethod`(short_name, long_name, short_desc, long_desc, ctrldata, expdata, annotation_path, output, normalization, replicates='Sum', LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.AnalysisMethod`

  Class to be inherited by analysis methods that determine changes in essentiality between two conditions (e.g. Resampling, DEHMM).

class `pytransit.analysis.base.` `InfoIcon`(panel, flag, bmp=None, tooltip='')

  Bases: `wx._core.StaticBitmap`

exception `pytransit.analysis.base.` `InvalidArgumentException`(message)

  Bases: `exceptions.Exception`

class `pytransit.analysis.base.` `MultiConditionMethod`(short_name, long_name, short_desc, long_desc, combined_wig, metadata, annotation_path, output, normalization=None, LOESS=False, ignoreCodon=True, wxobj=None)

  Bases: `pytransit.analysis.base.AnalysisMethod`

  Class to be inherited by analysis methods that compare essentiality between multiple conditions (e.g Anova).

class `pytransit.analysis.base.` `QuadConditionMethod`(short_name, long_name, short_desc, long_desc, ctrldataA, ctrldataB, expdataA, expdataB, annotation_path, output, normalization, replicates='Sum', LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.AnalysisMethod`

  Class to be inherited by analysis methods that determine changes in essentiality between four conditions (e.g. GI).

class `pytransit.analysis.base.` `SingleConditionMethod`(short_name, long_name, short_desc, long_desc, ctrldata, annotation_path, output, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.AnalysisMethod`

  Class to be inherited by analysis methods that determine essentiality in a single condition (e.g. Gumbel, Binomial, HMM).

class `pytransit.analysis.base.` `TransitAnalysis`(sn, ln, short_desc, long_desc, tn, method_class=<class pytransit.analysis.base.AnalysisMethod>, gui_class=<class pytransit.analysis.base.AnalysisGUI>, filetypes=[<class pytransit.analysis.base.TransitFile>])
  `fullname`()
  `getDescriptionText`()
  `getInstructionsText`()
  `getTransposonsText`()

class `pytransit.analysis.base.` `TransitFile`(identifier='#Unknown', colnames=[])

  Bases: `pytransit.analysis.base.TransitGUIBase`

  `displayInTrackView`(displayFrame, event)
  `getData`(path, colnames)
  `getHeader`(path)
  `getMenus`()

class `pytransit.analysis.base.` `TransitGUIBase`
  `console_message`(text)
  `console_message_inplace`(text)
  `status_message`(text, time=-1)
  `transit_error`(text)
  `transit_message`(text)
  `transit_message_inplace`(text)
  `transit_warning`(text)

## pytransit.analysis.binomial module

class `pytransit.analysis.binomial.` `BinomialAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.binomial.` `BinomialFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.binomial.` `BinomialGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.binomial.` `BinomialMethod`(ctrldata, annotation_path, output_file, samples=10000, burnin=500, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, pi0=0.5, pi1=0.5, M0=1.0, M1=1.0, a0=10.0, a1=10.0, b0=1.0, b1=1.0, alpha_w=0.5, beta_w=0.5, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  binomial

  `Run`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `usage_string`()

## pytransit.analysis.example module

class `pytransit.analysis.example.` `ExampleAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.example.` `ExampleFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.example.` `ExampleGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

class `pytransit.analysis.example.` `ExampleMethod`(ctrldata, annotation_path, output_file, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  Example

  `Run`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `usage_string`()

## pytransit.analysis.griffin module

class `pytransit.analysis.griffin.` `GriffinAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.griffin.` `GriffinFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.griffin.` `GriffinGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.griffin.` `GriffinMethod`(ctrldata, annotation_path, output_file, minread=1, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  griffin

  `Run`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `usage_string`()

## pytransit.analysis.gumbel module

class `pytransit.analysis.gumbel.` `GumbelAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.gumbel.` `GumbelFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.gumbel.` `GumbelGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.gumbel.` `GumbelMethod`(ctrldata, annotation_path, output_file, samples=10000, burnin=500, trim=1, minread=1, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  Gumbel

  `ExpectedRuns_cached`(n, q)
  `F_non`(p, N, R)
  `Run`()
  `classify`(n, r, p)
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  `good_orf`(gene)
  `sample_Z`(p, w1, N, R, S, T, mu_s, sigma_s, SIG)
  `sigmoid`(d, n)
  classmethod `usage_string`()

## pytransit.analysis.hmm module

class `pytransit.analysis.hmm.` `HMMAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.hmm.` `HMMGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.hmm.` `HMMGenesFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.hmm.` `HMMMethod`(ctrldata, annotation_path, output_file, replicates='Mean', normalization=None, LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  HMM

  `Run`()
  `backward_procedure`(A, B, PI, O, C=array([], dtype=float64))
  `calculate_pins`(reads)
  `forward_procedure`(A, B, PI, O)
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  `post_process_genes`(data, position, states, output_path)
  classmethod `usage_string`()
  `viterbi`(A, B, PI, O)

class `pytransit.analysis.hmm.` `HMMSitesFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

## pytransit.analysis.rankproduct module

class `pytransit.analysis.rankproduct.` `RankProductAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.rankproduct.` `RankProductFile`

  Bases: `pytransit.analysis.base.TransitFile`

class `pytransit.analysis.rankproduct.` `RankProductGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.rankproduct.` `RankProductMethod`(ctrldata, expdata, annotation_path, output_file, normalization='TTR', samples=10000, adaptive=False, doHistogram=False, replicates='Sum', LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.DualConditionMethod`

  rankproduct

  `Run`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `usage_string`()

## pytransit.analysis.resampling module

class `pytransit.analysis.resampling.` `ResamplingAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.resampling.` `ResamplingFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `displayHistogram`(displayFrame, event)
  `getHeader`(path)
  `getMenus`()

class `pytransit.analysis.resampling.` `ResamplingGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `GlobalDisable`()
  `GlobalEnable`()
  `definePanel`(wxobj)

class `pytransit.analysis.resampling.` `ResamplingMethod`(ctrldata, expdata, annotation_path, output_file, normalization='TTR', samples=10000, adaptive=False, doHistogram=False, includeZeros=False, pseudocount=0.0, replicates='Sum', LOESS=False, ignoreCodon=True, NTerminus=0.0, CTerminus=0.0, ctrl_lib_str='', exp_lib_str='', wxobj=None)

  Bases: `pytransit.analysis.base.DualConditionMethod`

  resampling

  `Run`()
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  classmethod `usage_string`()

## pytransit.analysis.tn5gaps module

class `pytransit.analysis.tn5gaps.` `Tn5GapsAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.tn5gaps.` `Tn5GapsFile`

  Bases: `pytransit.analysis.base.TransitFile`

  `getHeader`(path)

class `pytransit.analysis.tn5gaps.` `Tn5GapsGUI`

  Bases: `pytransit.analysis.base.AnalysisGUI`

  `definePanel`(wxobj)

class `pytransit.analysis.tn5gaps.` `Tn5GapsMethod`(ctrldata, annotation_path, output_file, replicates='Sum', normalization=None, LOESS=False, ignoreCodon=True, minread=1, NTerminus=0.0, CTerminus=0.0, wxobj=None)

  Bases: `pytransit.analysis.base.SingleConditionMethod`

  Example

  `Run`()
  `calc_overlap`(run_interv, gene_interv)
  classmethod `fromGUI`(wxobj)
  classmethod `fromargs`(rawargs)
  `intersect_size`(intv1, intv2)
  classmethod `usage_string`()

## pytransit.analysis.anova module

class `pytransit.analysis.anova.` `AnovaAnalysis`

  Bases: `pytransit.analysis.base.TransitAnalysis`

class `pytransit.analysis.anova.` `AnovaMethod`(combined_wig, metadata, annotation, normalization, output_file, ignored_conditions=set([]))

  Bases: `pytransit.analysis.base.MultiConditionMethod`

  anova

  `Run`()
  `filter_by_conditions_blacklist`(data, conditions, ignored_conditions)

    Filters out wigfiles, with ignored conditions. ([[Wigdata]], [Condition]) -> Tuple([[Wigdata]], [Condition])

  classmethod `fromargs`(rawargs)
  `group_by_condition`(wigList, conditions)

    Returns array of datasets, where each dataset corresponds to one condition. ([[Wigdata]], [Condition]) -> [[DataForCondition]] Wigdata :: [Number] Condition :: String DataForCondition :: [Number]

  `means_by_condition_for_gene`(sites, conditions, data)

    Returns a dictionary of {Condition: Mean} for each condition. ([Site], [Condition]) -> {Condition: Number} Site :: Number Condition :: String

  `means_by_rv`(data, RvSiteindexesMap, genes, conditions)

    Returns Dictionary of mean values by condition ([[Wigdata]], {Rv: SiteIndex}, [Gene], [Condition]) -> {Rv: {Condition: Number}} Wigdata :: [Number] SiteIndex :: Number Gene :: {start, end, rv, gene, strand} Condition :: String

  `read_samples_metadata`(metadata_file)

    Filename -> ConditionMap ConditionMap :: {Filename: Condition}

  `run_anova`(data, genes, MeansByRv, RvSiteindexesMap, conditions)

    Runs Anova (grouping data by condition) and returns p and q values ([[Wigdata]], [Gene], {Rv: {Condition: Mean}}, {Rv: [SiteIndex]}, [Condition]) -> Tuple([Number], [Number]) Wigdata :: [Number] Gene :: {start, end, rv, gene, strand} Mean :: Number SiteIndex: Integer Condition :: String

  classmethod `usage_string`()
  `wigs_to_conditions`(conditionsByFile, filenamesInCombWig)

    Returns list of conditions corresponding to given wigfiles. ({FileName: Condition}, [FileName]) -> [Condition] Condition :: [String]

`pytransit.analysis.anova.` `main`()

## Module contents