Git Product home page Git Product logo

tm2cbio's Introduction

tm2cbio

GSE4922 to cbio

Utility to translate tranSMART export files to a directory ready for import to cBioPortal

  1. Use the tranSMART data export functionality to obtain the data file with clinical data.
  2. Fill in the mapping file (see example for a simplistic mapping)
  3. Run the utility with a single argument - path to the mapping file
  4. Run the cbioportal importer on the created directory

Importer uses leaf concept nodes as names for clinical attributes where possible. If two concepts have the same leaf name, distinguishing parts of the concept path are added. This can be further customized by mapping concept to column name replace. If tranSMART ontology contains "special attributes" that cBioPortal recognizes (e.g. age, sex, for a list see mapping file), you can specify where in the ontology tree are they stored (don't use quotes and use slashes (/) instead of backslashes ()for specifying the path) and what conversion and/or text replacements need to be applied. All attributes are imported as STRING by default. INT and BOOLEAN can be specified using the mapping type configuration followed by a concept path. for example mapping type \Crizotinib PF2341066\IC50=INT

This converter supports clinical, expression, copy number and segmented (region level) copy number data.

To run the utility you need a log4j and groovy installed. You can run it with

wget https://archive.apache.org/dist/logging/log4j/1.2.17/log4j-1.2.17.jar
groovyc -cp .:log4j-1.2.17.jar src/org/transmart/tm2cbio/*.groovy src/org/transmart/tm2cbio/utils/*.groovy src/org/transmart/tm2cbio/datatypes/*.groovy src/org/transmart/tm2cbio/datatypes/expression/*.groovy src/org/transmart/tm2cbio/datatypes/copynumber/*.groovy src/org/transmart/tm2cbio/datatypes/clinical/*.groovy src/org/transmart/tm2cbio/datatypes/segmented/*.groovy
java -cp $GROOVY_HOME/embeddable/groovy-all-2.3.8.jar:.  org.transmart.tm2cbio.Main tm2cbio.mapping.GSE4922.txt

You will need to replace 2.3.8 with the version of Groovy you have installed

tm2cbio's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

thehyve aderidder

tm2cbio's Issues

Support for segmented copy number data

Transmart can have gene, probe or region level copy number data. cBioPortal supports gene and region (segmented, perhaps it could be used also for probe level).

Patient / Sample flag in clinical data file should be customisable

Currently tm2cbio labels every attribute in the data_clinical it generated as a sample attribute, even e.g. Race. Even though it is not currently an issues, as we have only 1 sample per patient, it would be better if a user can specify whether a clinical attribute is a patient or a sample attribute.

Desired solution:
allow user to specify the type in the mapping file

clinical meta file incorrect

I'm playing around with the newmetadataformat branch and I generated clinical files for the cluc. In the most recent cbioportal release the clinical files were split into a Sample file and a Patient file. Hence, the datatype tag should now be SAMPLE_ATTRIBUTES
Furthermore, the line in the datafile which contains "SAMPLE" is no longer allowed, since this is already defined by the datatype tag.

expression file data column to datatype mismatch

The tM data contains e.g. a column LOG2E, which I would like to use as data for my cBio import. My mapping file contains:

expression file path=data_mrna.tsv

one of VALUE, LOG2E or ZSCORE

expression data column=LOG2E

In the code, the data column is used directly as datatype
datatype: ${typeConfig.data_column}
However, cBio wants CONTINUOUS as its datatype. I think we're missing a mapping from data column to datatype, as now the datafile contains the correct data, but the meta file is wrong:

datatype: LOG2E
stable_id: null

clinical data header issue

I'm not 100% sure what's going on, but if my input clinical file contains:

PATIENT_ID RNAseq Illumina HiSeq2000\siNon-Targeting 1 RNAseq: Illumina HiSeq2000\siNon-targeting 1

This becomes

PATIENT_ID SAMPLE_ID siNon-Targeting_1 siNon-targeting_1

PATIENT_ID SAMPLE_ID RNAseq_Illumina_HiSeq2000/siNon-Targeting_1 RNAseq:_Illumina_HiSeq2000/siNon-targeting_1

STRING STRING STRING STRING

5 5 5 5

PATIENT_ID SAMPLE_ID siNon-Targeting_1 siNon-targeting_1

Even though I'll change the header anyway, apparently there is a bug here as the difference between:
RNAseq Illumina HiSeq2000\siNon-Targeting 1
and
RNAseq: Illumina HiSeq2000\siNon-targeting 1
is a ":" and a capital T and the difference we end up with is just the capital T. cBioPortal will not upload this, as it considers them the same.

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.