-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in codec to read from Gencode GTF files. Fixes #3277
Includes tests for both hg19 and hg38.
- Loading branch information
1 parent
c655fef
commit b12a3ef
Showing
28 changed files
with
6,159 additions
and
0 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
src/main/java/org/broadinstitute/hellbender/utils/codecs/GENCODE/GencodeGtfCDSFeature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package org.broadinstitute.hellbender.utils.codecs.GENCODE; | ||
|
||
import java.util.ArrayList; | ||
|
||
/** | ||
* A Gencode GTF Feature representing a CDS. | ||
* | ||
* A GTF Feature represents one row of a GTF File. | ||
* The specification of a GTF file is defined here: | ||
* http://mblab.wustl.edu/GTF22.html | ||
* | ||
* Created by jonn on 7/25/17. | ||
*/ | ||
// {gene,transcript,exon,CDS,UTR,start_codon,stop_codon,Selenocysteine}` | ||
final public class GencodeGtfCDSFeature extends GencodeGtfFeature { | ||
|
||
private GencodeGtfCDSFeature(String[] gtfFields) { | ||
super(gtfFields); | ||
} | ||
|
||
public static GencodeGtfFeature create(String[] gtfFields) { | ||
return new GencodeGtfCDSFeature(gtfFields); | ||
} | ||
|
||
private GencodeGtfCDSFeature(long featureOrderNumber, | ||
String chromosomeName, | ||
AnnotationSource annotationSource, | ||
FeatureType featureType, | ||
int genomicStartLocation, | ||
int genomicEndLocation, | ||
GenomicStrand genomicStrand, | ||
GenomicPhase genomicPhase, | ||
String geneId, | ||
String transcriptId, | ||
GeneTranscriptType geneType, | ||
GeneTranscriptStatus geneStatus, | ||
String geneName, | ||
GeneTranscriptType transcriptType, | ||
GeneTranscriptStatus transcriptStatus, | ||
String transcriptName, | ||
int exonNumber, | ||
String exonId, | ||
LocusLevel locusLevel, | ||
ArrayList<OptionalField<?>> optionalFields, | ||
String anonymousOptionalFields) { | ||
|
||
super(featureOrderNumber, chromosomeName, annotationSource, featureType, genomicStartLocation, genomicEndLocation, genomicStrand, genomicPhase, geneId, transcriptId, geneType, geneStatus, geneName, transcriptType, transcriptStatus, transcriptName, exonNumber, exonId, locusLevel, optionalFields, anonymousOptionalFields); | ||
} | ||
|
||
public static GencodeGtfFeature create(long featureOrderNumber, | ||
String chromosomeName, | ||
AnnotationSource annotationSource, | ||
FeatureType featureType, | ||
int genomicStartLocation, | ||
int genomicEndLocation, | ||
GenomicStrand genomicStrand, | ||
GenomicPhase genomicPhase, | ||
String geneId, | ||
String transcriptId, | ||
GeneTranscriptType geneType, | ||
GeneTranscriptStatus geneStatus, | ||
String geneName, | ||
GeneTranscriptType transcriptType, | ||
GeneTranscriptStatus transcriptStatus, | ||
String transcriptName, | ||
int exonNumber, | ||
String exonId, | ||
LocusLevel locusLevel, | ||
ArrayList<OptionalField<?>> optionalFields, | ||
String anonymousOptionalFields) { | ||
|
||
return new GencodeGtfCDSFeature(featureOrderNumber, chromosomeName, annotationSource, featureType, genomicStartLocation, genomicEndLocation, genomicStrand, genomicPhase, geneId, transcriptId, geneType, geneStatus, geneName, transcriptType, transcriptStatus, transcriptName, exonNumber, exonId, locusLevel, optionalFields, anonymousOptionalFields); | ||
} | ||
|
||
} |
Oops, something went wrong.