Skip to content

Commit

Permalink
gff -- show gene types IFF they are not associated with visible trans…
Browse files Browse the repository at this point in the history
…cripts. Previous implementation never showed gene types.
  • Loading branch information
jrobinso committed Aug 16, 2020
1 parent d032bf4 commit a2a7331
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/feature/featureSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FeatureSource {

// Default GFF filter -- these feature types will be filtered out
if (undefined === config.filterTypes) {
config.filterTypes = ['chromosome', 'gene']
config.filterTypes = ['chromosome']
}

if (config.features && Array.isArray(config.features)) {
Expand Down
8 changes: 7 additions & 1 deletion js/feature/gffHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,17 @@ class GFFHelper {
transcripts[transcriptId] = gffTranscript;
combinedFeatures.push(gffTranscript);
consumedFeatures.add(f);
gffTranscript.gene = geneMap[f.parent];
const g = geneMap[f.parent];
if(g) {
gffTranscript.gene = geneMap[f.parent];
consumedFeatures.add(g);
}
}
}
}

// Remove assigned genes

// Add exons
for (let f of features) {
if (exonTypes.has(f.type)) {
Expand Down

0 comments on commit a2a7331

Please sign in to comment.