Coder Social home page Coder Social logo

bimib-disco / tronco Goto Github PK

View Code? Open in Web Editor NEW
28.0 13.0 7.0 14.94 MB

Repository of the TRanslational ONCOlogy library, which includes various algorithms (such as CAPRESE and CAPRI) and the Pipeline for Cancer Inference (PICNIC).

Home Page: https://bimib-disco.github.io/TRONCO

License: GNU General Public License v3.0

R 100.00%
cancer-inference tumors algorithms

tronco's Introduction

TRONCO (TRanslational ONCOlogy)

Branch Status
master R-CMD-check-bioc
development R-CMD-check-bioc

The TRONCO (TRanslational ONCOlogy) R package collects algorithms to infer progression models via the approach of Suppes-Bayes Causal Network, both from an ensemble of tumors (cross-sectional samples) and within an individual patient (multi-region or single-cell samples).

The package provides parallel implementation of algorithms that process binary matrices where each row represents a tumor sample and each column a single-nucleotide or a structural variant driving the progression; a 0/1 value models the absence/presence of that alteration in the sample.

The tool can import data from plain, MAF or GISTIC format files, and can fetch it from the cBioPortal for cancer genomics. Functions for data manipulation and visualization are provided, as well as functions to import/export such data to other bioinformatics tools for, e.g, clustering or detection of mutually exclusive alterations. Inferred models can be visualized and tested for their confidence via bootstrap and cross-validation.

TRONCO is used for the implementation of the Pipeline for Cancer Inference (PICNIC).

tronco's People

Contributors

adamk93 avatar alexanderpico avatar andreacampagner avatar caravagn avatar costantinimatteo avatar danro9685 avatar luca-dex avatar marcoxa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tronco's Issues

Export - import NBS

Nella export NBS:

  • creare anche lo script .m che esegue NBS direttamente dalla export verso NBS assegnando i default per i path dei file usati da NBS
  • nello script permettere di selezionare per quali valori di K eseguire il clustering
  • aggiungere allo script m il salvataggio di un .mat che contiene una struct matlab con una dataset per ogni valore di K. il dataset deve contenere una colonna con la label ottenuta dal cluster e i nomi delle righe devono essere i sample_id dei pazienti

Nella import NBS:

  • avere una funzione che prende in input .mat generato da NBS e crea un dataframe R con una colonna per ogni valore di K, i valori di K nelle righe e come rownales i sample_id dei pazienti

oncoprint + annotate.consolidate.events = T

oncoprint(pt, annotate.consolidate.events = T)

Error in genes.annotation[unlist(lapply(invalid$indistinguishable, function(z) { :
incorrect number of subscripts on matrix
In addition: Warning message:
In genes.annotation$consolidate = "none" : Coercing LHS to a list

tmp = consolidate.data(pt, T)

Indistinguishable events:
type event
G22 "variant" "chr19_52888774"
G23 "variant" "chr19_52888833"
Total number of events for these genes: 2

Hypo.add

hypotheses.add('1', OR(x), y )
hypotheses.add('2', OR(x), z )

Fails, while it should not - add z as y as possible effects.

Fix in delete.gene

In delete.gene specifically (but we need to check in all the other utility scripts) when removing a gene, it should be removed from the hypotheses too.

Functions association

To do list for the TRONCO / Cytron magic program!

Check Function TRONCO name Description Notes
Import query TCGA Import data from TCGA @caravagn from the website?
Import query CBIO cbio.query Import data from CBIO
Import MAF maf simple lib
Import VCF vcf example
Import GISTIC import.gistic
Import TXT
Viz table
Viz oncoprint oncoprint rename -> tronco.print ?
Viz report show
Manual Selection events.selection samples, genes, events
Frequency Selection events.selection samples, genes, events
Name I/O Selection events.selection samples, genes, events
Rename rename.type rename.gene genes, types
Delete delete.type delete.gene type,genes
Add samples, events (bind)
Merge union.types -> merge.types type, samples, genes, events, type=1/type=2
Bind samples (sbind), events (ebind)

as.selective.advantage.relations does nothing with caprese models

As it says: using as.selective.advantage.relations on a caprese model will return NULL, even when we can see there are terms for pr, tp and hg (using, say, as.confidence(themodel, conf = c("pr", "tp", "hg"))).

But the help does not indicate that as.selective.advantage will not work with caprese models.

Hypo.add is.compliant

Update $annotations and $types in the input object -- which should be made available at any time by using as.dataset(...). The idea is that I want to plot lifted matrices as well.

is.compliant(x)
x.h = hypothesis.add(x, ...)
oncoprint(as.dataset(x.h))

enforce numeric

Add a call to enforce.numeric in tronco.capri and in tronco.caprese

No edge in adjacency matrix! Nothing to show here.

I'm using TRONCO for progression model on one of our project involving hematological cancer. We have very low mutational load to begin with. Everything seems to work , but during tronco.plot(model), I get

NULL
Warning message:
In tronco.plot(apl.model) :
  No edge in adjacency matrix! Nothing to show here.

Is this because of low mutation numbers ? Any parameters I need to tune in ?

Vignette

Create a new vignette.

  • part 1: data manipulation (CRC)
  • part 2: reconstruction (aCML)
  • description

Refactoring

Make the capri output compliant with is.compliant

Inconsistent function call

In import.MAF, at line 110 there is a call to import.genotypes with parameter default.variant = "Mutation", however no such parameter exists in import.genotypes definition.
Same problem is raised in import.GISTIC.
Changing default.variant for event.type in the function call all seems to work so possibly this is the solution.

doc - roxygen2 style

  • as.functions.R
  • caprese.algorithm.R
  • caprese.bootstrap.R
  • caprese.estimation.R
  • capri.algorithm.R
  • capri.bootstrap.R
  • capri.estimation.R
  • capri.hypotheses.R
  • correctness.R
  • data.R
  • editing.functions.R
  • external.R
  • loading.R
  • selection.R
  • tronco.R
  • visualization.R
  • which.functions.R
  • zzz.R

as.kfold.posterr returns a data frame with all columns as characters

I do not think that is intended as the columns for MEAN.POSTERR and SD.POSTERR are also of type character, not numeric. In fact, that this is happening can be seen also in the vignette, p. 37. This is inconvenient, and inconsistent with prederr.

Example:

data(test_model_kfold)
s1 <- as.kfold.posterr(test_model_kfold)
summary(s1[[1]])
summary(s1[[2]])

intersect

Fare l'interserct tenendo conto di 2 cose:

  • pazienti, presenti sia in cnv sia in mut
  • eventi, presente sia in cnv sia in mut se presenti sono stati analizzati, possono anche essere a 0

env are evil

Remove global env variables in hypothesis functions.

Atomic to hypothesis

pseudo presudo presudo code:

In hypotheses expansion:

foreach hypo
    if atomic nodes to hypo
        transpose hypo adj matrix
        add prefix to logic nodes (like `UP_AND...`,...)
        initial node <- which column sum == 0
        merge graph on adj matrix and  hypo t adj matrix
        reconnet edges to initial node (from adj matrix search for atomic node to hypo)

In tronco plot:

create layout for UP logic nodes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.