Class GeneFeatureHelper


  • public class GeneFeatureHelper
    extends Object
    Author:
    Scooter Willis
    • Constructor Detail

      • GeneFeatureHelper

        public GeneFeatureHelper()
    • Method Detail

      • loadFastaAddGeneFeaturesFromUpperCaseExonFastaFile

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> loadFastaAddGeneFeaturesFromUpperCaseExonFastaFile​(File fastaSequenceFile,
                                                                                                                                                       File uppercaseFastaFile,
                                                                                                                                                       boolean throwExceptionGeneNotFound)
                                                                                                                                                throws Exception
        Throws:
        Exception
      • outputFastaSequenceLengthGFF3

        public static void outputFastaSequenceLengthGFF3​(File fastaSequenceFile,
                                                         File gffFile)
                                                  throws Exception
        Output a gff3 feature file that will give the length of each scaffold/chromosome in the fasta file. Used for gbrowse so it knows length.
        Parameters:
        fastaSequenceFile -
        gffFile -
        Throws:
        Exception
      • loadFastaAddGeneFeaturesFromGeneIDGFF2

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> loadFastaAddGeneFeaturesFromGeneIDGFF2​(File fastaSequenceFile,
                                                                                                                                           File gffFile)
                                                                                                                                    throws Exception
        Loads Fasta file and GFF2 feature file generated from the geneid prediction algorithm
        Parameters:
        fastaSequenceFile -
        gffFile -
        Returns:
        Throws:
        Exception
      • addGeneIDGFF2GeneFeatures

        public static void addGeneIDGFF2GeneFeatures​(LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> chromosomeSequenceList,
                                                     FeatureList listGenes)
                                              throws Exception
        Load GFF2 feature file generated from the geneid prediction algorithm and map features onto the chromosome sequences
        Parameters:
        chromosomeSequenceList -
        listGenes -
        Throws:
        Exception
      • getChromosomeSequenceFromDNASequence

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> getChromosomeSequenceFromDNASequence​(LinkedHashMap<String,​org.biojava.nbio.core.sequence.DNASequence> dnaSequenceList)
      • loadFastaAddGeneFeaturesFromGmodGFF3

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> loadFastaAddGeneFeaturesFromGmodGFF3​(File fastaSequenceFile,
                                                                                                                                         File gffFile,
                                                                                                                                         boolean lazyloadsequences)
                                                                                                                                  throws Exception
        Lots of variations in the ontology or descriptors that can be used in GFF3 which requires writing a custom parser to handle a GFF3 generated or used by a specific application. Probably could be abstracted out but for now easier to handle with custom code to deal with gff3 elements that are not included but can be extracted from other data elements.
        Parameters:
        fastaSequenceFile -
        gffFile -
        lazyloadsequences - If set to true then the fasta file will be parsed for accession id but sequences will be read from disk when needed to save memory
        Returns:
        Throws:
        Exception
      • addGmodGFF3GeneFeatures

        public static void addGmodGFF3GeneFeatures​(LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> chromosomeSequenceList,
                                                   FeatureList listGenes)
                                            throws Exception
        Load GFF3 file using mRNA as the gene feature as not all GFF3 files are complete
        Parameters:
        chromosomeSequenceList -
        listGenes -
        Throws:
        Exception
      • loadFastaAddGeneFeaturesFromGlimmerGFF3

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> loadFastaAddGeneFeaturesFromGlimmerGFF3​(File fastaSequenceFile,
                                                                                                                                            File gffFile)
                                                                                                                                     throws Exception
        Throws:
        Exception
      • loadFastaAddGeneFeaturesFromGeneMarkGTF

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ChromosomeSequence> loadFastaAddGeneFeaturesFromGeneMarkGTF​(File fastaSequenceFile,
                                                                                                                                            File gffFile)
                                                                                                                                     throws Exception
        Throws:
        Exception
      • getProteinSequences

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.ProteinSequence> getProteinSequences​(Collection<org.biojava.nbio.core.sequence.ChromosomeSequence> chromosomeSequences)
                                                                                                              throws Exception
        Throws:
        Exception
      • getGeneSequences

        public static LinkedHashMap<String,​org.biojava.nbio.core.sequence.GeneSequence> getGeneSequences​(Collection<org.biojava.nbio.core.sequence.ChromosomeSequence> chromosomeSequences)
                                                                                                        throws Exception
        Throws:
        Exception