public static DigestedFastaFile performDigest(FastaFile f, int numMissedCleavages) { // The input fasta file path String fastaFilePath = f.getFileName(); return(performDigest(fastaFilePath, numMissedCleavages, true)); }
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); }
public static DigestedFastaFile performDigest(Dictionary <String, Protein> protein_hash, int numMissedCleavages) { String tempOutput = "temp.tsv"; Writer.writeFastaFile(tempOutput, new List <Protein>(protein_hash.Values)); FastaFile f = new FastaFile(tempOutput, protein_hash); return(performDigest(f, numMissedCleavages)); }
private void btnReadFasta_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { List<Protease.Type> ProteaseType = new List<Protease.Type>(); if (chkEnzy_Trypsin.Checked)//Trypsin { ProteaseType.Add(Protease.Type.Trypsin); } if (chkEnzy_GlucE.Checked)//GlucE { ProteaseType.Add(Protease.Type.GlucE); } if (chkEnzy_GlucED.Checked) //GlucED { ProteaseType.Add(Protease.Type.GlucED); } if (chkEnzy_None.Checked || ProteaseType.Count == 0) { ProteaseType.Add(Protease.Type.None); } enumPeptideMutation pepMuta = enumPeptideMutation.NoMutation; if (cboPepMutation.SelectedIndex == 1) { pepMuta = enumPeptideMutation.DtoN; } else if (cboPepMutation.SelectedIndex == 2) { pepMuta = enumPeptideMutation.AnyToN; } string fastaFile = openFileDialog1.FileName; FastaFile file = new FastaFile(fastaFile); List<string> Peptides = file.CreateCleavedPeptides(Convert.ToInt32(txtMissCleavage.Text), ProteaseType); txtPeptides.Text = "Digested Peptides" + Environment.NewLine + Environment.NewLine; foreach (string p in Peptides) { txtPeptides.Text += p + Environment.NewLine; } txtPeptides.Text += Environment.NewLine + Environment.NewLine + Environment.NewLine + Environment.NewLine; txtPeptides.Text += "N-linked Peptides" + Environment.NewLine + Environment.NewLine; List<string> lstPeptides = file.CreateCleavedNGlycoPeptides(Convert.ToInt32(txtMissCleavage.Text), ProteaseType, pepMuta); foreach (string p in lstPeptides) { txtPeptides.Text += p + Environment.NewLine; } } }
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."); }
public static Database loadExclusionDatabase(FastaFile fasta, DigestedFastaFile digestedFasta) { return(new Database(fasta, digestedFasta)); }
public Database(FastaFile fastaFile, DigestedFastaFile digestedFastaFile, bool _includeCarbamidoModification, bool _includeRetentionTime) : this(fastaFile, digestedFastaFile, _includeCarbamidoModification, _includeRetentionTime, DEFAULT_RETENTION_TIME_WINDOW) { }
public Database(FastaFile fastaFile, DigestedFastaFile digestedFastaFile) : this(fastaFile, digestedFastaFile, DEFAULT_INCLUDE_CARBAMIDO_MODIFICATION, DEFAULT_INCLUDE_RETENTION_TIME) { }