Skip to content

Commit

Permalink
Merge pull request #16 from xzhuo/patch-1
Browse files Browse the repository at this point in the history
Add genome comparison track in the annotation tracks, and use chromos…
  • Loading branch information
lidaof committed May 17, 2019
2 parents 8da06e0 + 294c2c8 commit 2c02b99
Showing 1 changed file with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions docs/add.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,27 @@ In the mm10 folder, create a file called ``annotationTracks.json`` with followin
"height": 30
}
]
}
},
"Genome Comparison": [
{
"name": "hg38tomm10",
"label": "Human hg38 to mm10 blastz",
"querygenome": "hg38",
"filetype": "genomealign",
"url": "https://vizhub.wustl.edu/public/mm10/weaver/mm10_hg38_axt.gz"
}
]
}

Get chromosome sizes
~~~~~~~~~~~~~~~~~~~~

Download the file from http://hgdownload.soe.ucsc.edu/goldenPath/mm10/bigZips/mm10.chrom.sizes,
you can following awk command to get the input as below::
you can following awk command to create the ``chromSize.json`` file::

awk '{ print "new Chromosome(\""$1"\", "$2"),"}' <( sort -V mm10.chrom.sizes | grep -v '_')
sort -V myoLuc2.chrom.sizes | awk 'BEGIN{print "["}{ print "\t{\"chr\": \""$1"\", \"size\": "$2"},"}END{print "]"}' > chromSize.json

Move the ``chromSize.json`` file into the mm10 folder.

Create genome configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -105,31 +116,10 @@ Create a file called ``mm10.js``, filling the following contents::
import TrackModel from '../../TrackModel';
import cytobands from './cytoBand.json';
import annotationTracks from "./annotationTracks.json";

const genome = new Genome("mm10", [
new Chromosome("chr1", 195471971),
new Chromosome("chr2", 182113224),
new Chromosome("chr3", 160039680),
new Chromosome("chr4", 156508116),
new Chromosome("chr5", 151834684),
new Chromosome("chr6", 149736546),
new Chromosome("chr7", 145441459),
new Chromosome("chr8", 129401213),
new Chromosome("chr9", 124595110),
new Chromosome("chr10", 130694993),
new Chromosome("chr11", 122082543),
new Chromosome("chr12", 120129022),
new Chromosome("chr13", 120421639),
new Chromosome("chr14", 124902244),
new Chromosome("chr15", 104043685),
new Chromosome("chr16", 98207768),
new Chromosome("chr17", 94987271),
new Chromosome("chr18", 90702639),
new Chromosome("chr19", 61431566),
new Chromosome("chrX", 171031299),
new Chromosome("chrY", 91744698),
new Chromosome("chrM", 16299),
]);
import chromSize from "./chromSize.json";
const allSize = chromSize.map(genom => new Chromosome(genom.chr, genom.size));
const genome = new Genome("myoLuc2", allSize);

const navContext = genome.makeNavContext();
const defaultRegion = navContext.parse("chr6:52425276-52425961");
Expand Down

0 comments on commit 2c02b99

Please sign in to comment.