Coder Social home page Coder Social logo

mafreader's Introduction

MAFReader Quickstart

MAFReader is a simple command line tool that reads a MAF file, calls CIViC for each line therein.

MAFReader outputs a table in markdown format for easy inclusion into downstream reports

MAFReader requires Python 3.*. To check your python version, run:

    $ python -V
    Python 3.4.2

Usage:


    $ python mafeader.py -h
    usage: mafreader [-h] [-i INPUT_FILE] [-o OUTPUT_FILE] [-c HOST]
                 [-col ENTREZ_ID_COLUMN]

    optional arguments:
      -h, --help            show this help message and exit
      -i INPUT_FILE, --input_file INPUT_FILE
                            input file (assumed to be tab separated MAF format);
                            defaults to stdin
      -o OUTPUT_FILE, --output_file OUTPUT_FILE
                            output file; defaults to stdout
      -c HOST, --host HOST  url of reference civic host (default:
                            civic.genome.wustl.edu)
      -col ENTREZ_ID_COLUMN, --entrez_id_column ENTREZ_ID_COLUMN
                            column in the input file that contains the entrez id.
                            Defaults to 1 (0 based)

Process

On entry MAFReader reads all variants from CIViC for a particular gene, using entrez_id as the gene identifier.

  • If there is no data returned from CIViC, MAFReader displays gene not found in civic and moves on.
  • If there is data returned from CIViC, MAFReader searches the CIViC EvidenceItems returned and matches on {Chromosome}:{Start_position}-{End_position} ({Reference_Allele}->{Tumor_Seq_Allele1})
    • If there is a match MAFReader displays [civic variant] with a link to the specific variant in CIViC
    • Otherwise MAFReader displays [civic gene] with a link to the gene in CIViC

Output

$ python mafreader.py  -i resources/simple.maf
hugo_symbol entrez_gene_id CIViC variant name drugs link
391 207 E17K MK-2206 civic variant
11998 7157 R175H N/A civic variant
1316 238 EML4-ALK civic gene
CAPZA1 829 gene not found in civic

Customization

For local CIViC deployments use the -c option "-c locahost:3000"

Issues

  • MAFReader calls CIViC for each variant in the MAF file. An optimization would be to modify CIViC to accept a batch of entrez_ids to match on.

  • MAFReader does not cache any reponses from CIViC. An optimization would be for MAFReader to cache responses and leverage the ETag header CIViC provides.

  • MAFReader does not populate CIViC with any information if it encounters a "no find".

mafreader's People

Contributors

bwalsh avatar

Watchers

 avatar  avatar

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.