diff --git a/plugins/gtf/src/GtfAdapter/GtfAdapter.ts b/plugins/gtf/src/GtfAdapter/GtfAdapter.ts index 3796a7a523..2b5df45ede 100644 --- a/plugins/gtf/src/GtfAdapter/GtfAdapter.ts +++ b/plugins/gtf/src/GtfAdapter/GtfAdapter.ts @@ -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] diff --git a/test_data/human_vs_mouse.json b/test_data/human_vs_mouse.json new file mode 100644 index 0000000000..099d482a72 --- /dev/null +++ b/test_data/human_vs_mouse.json @@ -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"] + } + ] +}