Skip to content

Commit

Permalink
[skip ci] Human vs mouse synteny
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 9, 2023
1 parent aa43be2 commit cf5522e
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 7 deletions.
15 changes: 8 additions & 7 deletions plugins/gtf/src/GtfAdapter/GtfAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ export default class extends BaseFeatureDataAdapter {
}) as FeatureLoc[][]

const intervalTree = new IntervalTree()
const ret = data.flat().map(
(f, i) =>
new SimpleFeature({
data: featureData(f),
id: `${this.id}-${refName}-${i}`,
}),
)
const ret = data.flat().map((f, i) => {
const data = featureData(f)
return new SimpleFeature({
// @ts-ignore
data: { ...data, name: data.gene_name },
id: `${this.id}-${refName}-${i}`,
})
})

for (let i = 0; i < ret.length; i++) {
const obj = ret[i]
Expand Down
100 changes: 100 additions & 0 deletions test_data/human_vs_mouse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"assemblies": [
{
"name": "hs1",
"sequence": {
"type": "ReferenceSequenceTrack",
"trackId": "hs1-ReferenceSequenceTrack",
"adapter": {
"type": "TwoBitAdapter",
"twoBitLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/hs1/bigZips/hs1.2bit"
},
"chromSizesLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/hs1/bigZips/hs1.chrom.sizes.txt"
}
}
}
},
{
"name": "mm39",
"sequence": {
"type": "ReferenceSequenceTrack",
"trackId": "mm39-ReferenceSequenceTrack",
"adapter": {
"type": "TwoBitAdapter",
"twoBitLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.2bit"
},
"chromSizesLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.chrom.sizes"
}
}
}
}
],
"configuration": {},
"connections": [],
"defaultSession": {
"name": "New Session"
},
"tracks": [
{
"type": "FeatureTrack",
"trackId": "liftoff_genes",
"name": "liftOff genes",
"assemblyNames": ["hs1"],
"category": ["Annotation"],
"adapter": {
"type": "GtfAdapter",
"gtfLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/hs1/bigZips/genes/catLiftOffGenesV1.gtf.gz",
"locationType": "UriLocation"
}
}
},
{
"type": "FeatureTrack",
"trackId": "refgene",
"name": "refGene",
"assemblyNames": ["mm39"],
"category": ["Annotation"],
"adapter": {
"type": "GtfAdapter",
"gtfLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/genes/refGene.gtf.gz",
"locationType": "UriLocation"
}
}
},

{
"type": "FeatureTrack",
"trackId": "ncbiRefSeq",
"name": "ncbiRefSeq",
"adapter": {
"type": "BigBedAdapter",
"bigBedLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/gbdb/hs1/bbi/ncbiRefSeq.bb",
"locationType": "UriLocation"
}
},
"assemblyNames": ["hs1"]
},
{
"type": "SyntenyTrack",
"trackId": "liftover",
"name": "liftover",
"adapter": {
"type": "ChainAdapter",
"chainLocation": {
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/hs1/liftOver/hs1ToMm39.over.chain.gz",
"locationType": "UriLocation"
},
"targetAssembly": "hs1",
"queryAssembly": "mm39"
},
"assemblyNames": ["hs1", "mm39"]
}
]
}

0 comments on commit cf5522e

Please sign in to comment.