예제 #1
0
        private static Database databaseSetUp(String fasta_file_name)
        {
            FastaFile         f  = Loader.parseFasta(fasta_file_name);
            DigestedFastaFile df = PerformDigestion.performDigest(f, GlobalVar.NUM_MISSED_CLEAVAGES);

            int numberOfProteinsInFasta         = f.getAccessionToFullSequence().Count;
            int numberOfPeptidesInDigestedFasta = df.getDigestedPeptideArray().Count;

            log.Info("Fasta file: " + fasta_file_name);
            log.Info("Num missed cleavages: " + GlobalVar.NUM_MISSED_CLEAVAGES);
            log.Info("Number of proteins: " + numberOfProteinsInFasta);
            log.Info("Number of peptides: " + numberOfPeptidesInDigestedFasta);

            log.Debug("Constructing graph...");
            Database g;

            if (GlobalVar.isSimulationForFeatureExtraction == true)
            {
                g = new Database(f, df, true, false);
            }
            else
            {
                g = new Database(f, df, true, true);
            }
            log.Debug(g);

            return(g);
        }
예제 #2
0
        public Database(FastaFile fastaFile, DigestedFastaFile digestedFastaFile, bool _includeCarbamidoModification,
                        bool _includeRetentionTime, double _retentionTimeWindow)
        {
            includeCarbamidoModification = _includeCarbamidoModification;
            includeRetentionTime         = _includeRetentionTime;
            retentionTimeWindow          = _retentionTimeWindow;
            log.Debug("Constructing graph...");
            SequenceToPeptide   = new Dictionary <String, Peptide>();
            peptides            = new List <Peptide>();
            AccesstionToProtein = fastaFile.getAccessionToFullSequence();
            addPeptides(digestedFastaFile.getDigestedPeptideArray());

            log.Debug("Done constructing graph.");
        }