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); }
//depricated public static String GenerateConcacenatedDecoyFasta_MimicCometInternal(String fastaFile, String outputFilePath) { StreamWriter sw = new StreamWriter(outputFilePath); DigestedFastaFile df = PerformDigestion.performDigest(fastaFile, GlobalVar.NUM_MISSED_CLEAVAGES, false); List <DigestedPeptide> targetSequences = df.getDigestedPeptideArray(); String line; foreach (DigestedPeptide targetSeq in targetSequences) { //write the target sequence line = ">" + targetSeq.getAccession(); sw.WriteLine(line); line = targetSeq.getSequence(); sw.WriteLine(line); //write the decoy sequence line = ">" + GlobalVar.DecoyPrefix + targetSeq.getAccession(); sw.WriteLine(line); line = ReverseSequence_keepCTerm(targetSeq.getSequence()); sw.WriteLine(line); } sw.Close(); return(outputFilePath); }
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."); }