Example #1
0
        /// <summary>
        /// executes the program
        /// </summary>
        protected override void ProgramExecution()
        {
            var transcriptPath = ConfigurationSettings.InputPrefix + ".transcripts.gz";
            var regulatoryPath = ConfigurationSettings.InputPrefix + ".regulatory.gz";
            var genePath       = ConfigurationSettings.InputPrefix + ".genes.gz";
            var intronPath     = ConfigurationSettings.InputPrefix + ".introns.gz";
            var mirnaPath      = ConfigurationSettings.InputPrefix + ".mirnas.gz";
            var siftPath       = ConfigurationSettings.InputPrefix + ".sift.dat";
            var polyphenPath   = ConfigurationSettings.InputPrefix + ".polyphen.dat";
            var peptidePath    = ConfigurationSettings.InputPrefix + ".peptides.gz";

            var renamer = ChromosomeRenamer.GetChromosomeRenamer(FileUtilities.GetReadStream(ConfigurationSettings.InputReferencePath));

            using (var transcriptReader = new VepTranscriptReader(transcriptPath))
                using (var regulatoryReader = new VepRegulatoryReader(regulatoryPath))
                    using (var geneReader = new VepGeneReader(genePath))
                        using (var mergedGeneReader = new VepCombinedGeneReader(ConfigurationSettings.InputMergedGenesPath))
                            using (var intronReader = new VepSimpleIntervalReader(intronPath, "intron", GlobalImportCommon.FileType.Intron))
                                using (var mirnaReader = new VepSimpleIntervalReader(mirnaPath, "miRNA", GlobalImportCommon.FileType.MicroRna))
                                    using (var peptideReader = new VepSequenceReader(peptidePath, "peptide", GlobalImportCommon.FileType.Peptide))
                                    {
                                        var converter = new NirvanaDatabaseCreator(transcriptReader, regulatoryReader, geneReader,
                                                                                   mergedGeneReader, intronReader, mirnaReader, peptideReader, renamer);

                                        converter.LoadData();
                                        converter.MarkCanonicalTranscripts(ConfigurationSettings.InputLrgPath);
                                        converter.CreateTranscriptCacheFile(ConfigurationSettings.OutputCacheFilePrefix);
                                        converter.CopyPredictionCacheFile("SIFT", siftPath, CacheConstants.SiftPath(ConfigurationSettings.OutputCacheFilePrefix));
                                        converter.CopyPredictionCacheFile("PolyPhen", polyphenPath, CacheConstants.PolyPhenPath(ConfigurationSettings.OutputCacheFilePrefix));
                                    }
        }
Example #2
0
        /// <summary>
        /// constructor
        /// </summary>
        public NirvanaDatabaseCreator(VepTranscriptReader transcriptReader, VepRegulatoryReader regulatoryReader,
                                      VepGeneReader geneReader, VepCombinedGeneReader mergedGeneReader, VepSimpleIntervalReader intronReader,
                                      VepSimpleIntervalReader mirnaReader, VepSequenceReader peptideReader, ChromosomeRenamer renamer)
        {
            _transcriptReader = transcriptReader;
            _regulatoryReader = regulatoryReader;
            _geneReader       = geneReader;
            _mergedGeneReader = mergedGeneReader;
            _intronReader     = intronReader;
            _microRnaReader   = mirnaReader;
            _peptideReader    = peptideReader;
            _renamer          = renamer;

            _transcripts        = new List <VD.Transcript>();
            _regulatoryElements = new List <VD.RegulatoryElement>();
            _genes       = new List <MutableGene>();
            _mergedGenes = new List <MutableGene>();
            _introns     = new List <VD.SimpleInterval>();
            _microRnas   = new List <VD.SimpleInterval>();
            _peptideSeqs = new List <string>();
        }