-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
not tested, don't use it yet
- Loading branch information
Showing
8 changed files
with
144 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package FDREstimator; | ||
|
||
import MSUmpire.BaseDataStructure.DBSearchParam; | ||
import MSUmpire.DIA.DIAPack; | ||
import MSUmpire.PSMDataStructure.LCMSID; | ||
import MSUmpire.PSMDataStructure.PepIonID; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import javax.xml.parsers.ParserConfigurationException; | ||
import org.xml.sax.SAXException; | ||
import org.xmlpull.v1.XmlPullParserException; | ||
|
||
/** | ||
* | ||
* @author Chih-Chiang Tsou <[email protected]> | ||
*/ | ||
public class FDR_DataSetLevel { | ||
|
||
public LCMSID combineID = null; | ||
|
||
public void GeneratePepIonList(ArrayList<DIAPack> DIAFileList, DBSearchParam param, String combineIDPath) throws IOException, ParserConfigurationException, SAXException, XmlPullParserException, ClassNotFoundException, InterruptedException { | ||
|
||
for (DIAPack diafile : DIAFileList) { | ||
diafile.ParsePepXML(param,null); | ||
} | ||
|
||
//Estimate peptide level PepFDR in whole dataset | ||
combineID = new LCMSID(combineIDPath, param.DecoyPrefix, param.FastaPath); | ||
for (DIAPack Diafile : DIAFileList) { | ||
LCMSID lcms = Diafile.IDsummary; | ||
for (PepIonID pepIonID : lcms.GetPepIonList().values()) { | ||
if (!combineID.GetPepIonList().containsKey(pepIonID.GetKey())) { | ||
PepIonID newpep = pepIonID.ClonePepIonID(); | ||
if (pepIonID.IsDecoy(param.DecoyPrefix)) { | ||
newpep.IsDecoy = 1; | ||
} else { | ||
newpep.IsDecoy = 0; | ||
} | ||
combineID.AddPeptideID(newpep); | ||
} | ||
if (combineID.GetPepIonList().get(pepIonID.GetKey()).MaxProbability < pepIonID.MaxProbability) { | ||
combineID.GetPepIonList().get(pepIonID.GetKey()).MaxProbability = pepIonID.MaxProbability; | ||
} | ||
} | ||
} | ||
combineID.DecoyTag = param.DecoyPrefix; | ||
combineID.FDR = param.PepFDR; | ||
combineID.FindPepProbThresholdByFDR(); | ||
combineID.RemoveDecoyPep(); | ||
combineID.RemoveLowProbPep(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters