Skip to content

Commit

Permalink
Change the factor in fount of xcorr
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed May 21, 2017
1 parent fcd901a commit e86ee1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/proteomics/Search/CalEValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ private int generateRandomRandomScores(int gap_num) {
String[] temp = seq_1_link_site.split("-");
String seq_1 = temp[0];
short link_site = Short.valueOf(temp[1]);
double score1 = theo_mz_1.dot(pl_map_xcorr) * 0.25;
SparseBooleanVector theo_mz_1 = mass_tool_obj.buildTheoVector(MassTool.seqToAAList(seq_1), link_site, precursor_mass - mass_1, result_entry.charge, max_common_ion_charge, pl_map_xcorr.getMaxIdx());
double score1 = theo_mz_1.dot(pl_map_xcorr) * 0.005;
if (score1 > Search.single_chain_t) {
gap_num = generateMoreScoresSub(sub_map, seq_1, score1, precursor_mass, gap_num);
if (gap_num < 0) {
Expand All @@ -248,8 +248,8 @@ private int generateMoreScoresSub(NavigableMap<Float, Set<String>> sub_map, Stri
String seq_2 = temp[0];
short link_site = Short.valueOf(temp[1]);
if (!seq_1.contentEquals(seq_2)) {
double score2 = theo_mz_2.dot(pl_map_xcorr) * 0.25;
SparseBooleanVector theo_mz_2 = mass_tool_obj.buildTheoVector(MassTool.seqToAAList(seq_2), link_site, precursor_mass - mass_2, result_entry.charge, max_common_ion_charge, pl_map_xcorr.getMaxIdx());
double score2 = theo_mz_2.dot(pl_map_xcorr) * 0.005;
if (score2 > Search.single_chain_t) {
double score = score1 + score2;
result_entry.addToScoreHistogram(score);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/proteomics/Search/Search.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void linearScan(SpectrumEntry spectrumEntry, SparseVector xcorrPL, Chain
SparseBooleanVector theo_mz = mass_tool_obj.buildTheoVector(chainEntry.aaArray, link_site_1, spectrumEntry.precursor_mass - chainEntry.chain_mass, precursor_charge, max_common_ion_charge, xcorrPL.getMaxIdx());

// Calculate dot produce
double dot_product = theo_mz.dot(xcorrPL) * 0.25;
double dot_product = theo_mz.dot(xcorrPL) * 0.005;

if (ECL2.debug) {
debugEntryList.add(new DebugEntry(chainEntry.seq, link_site_1, chainEntry.chain_mass, dot_product));
Expand Down

0 comments on commit e86ee1e

Please sign in to comment.