|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fhcrc.cpl.toolbox.proteomics.feature.FeatureGrouper
public class FeatureGrouper
Uses clustering (Clusterer2D) to align multiple feature sets
| Field Summary | |
|---|---|
protected int |
_conflictResolver
|
protected FeatureClusterer |
_featureClusterer
|
protected boolean |
_useMassInsteadOfMz
|
static int |
BUCKET_EVALUATION_MODE_ONE_FROM_EACH
|
static int |
BUCKET_EVALUATION_MODE_PEPTIDE_AGREEMENT
|
protected int |
bucketEvaluationPeptideAgreementMatchScore
|
protected double |
bucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple
|
protected double |
bucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple
|
protected int |
bucketEvaluationPeptideAgreementMismatchPenalty
|
static int |
CONFLICT_RESOLVER_BEST
|
static int |
CONFLICT_RESOLVER_SUM
|
static int |
DEFAULT_CONFLICT_RESOLVER
|
static int |
DEFAULT_PEPTIDE_AGREEMENT_MATCH_SCORE
|
static int |
DEFAULT_PEPTIDE_AGREEMENT_MISMATCH_PENALTY
|
| Constructor Summary | |
|---|---|
FeatureGrouper()
Initialize the clusterer |
|
FeatureGrouper(FeatureSet fs,
boolean useMassForMz)
Initialize, set usemassformz, add a featureset |
|
| Method Summary | |
|---|---|
void |
addSet(FeatureSet fs)
|
protected java.lang.String |
buildFeatureSetColumnSuffix(FeatureSet featureSet,
int featureSetNumber)
build the column suffix for this featureset. |
Pair<java.lang.Double,java.lang.Integer> |
calculateBestBuckets(double[] massOrMzBuckets,
int[] scanBuckets)
By default, simply evaluate the bucket settings based on the number of rows with exactly one feature from each bucket |
Pair<java.lang.Double,java.lang.Integer> |
calculateBestBuckets(double[] massOrMzBuckets,
int[] scanBuckets,
int bucketEvaluationMode)
|
protected static java.lang.String |
createArrayRow(Clusterer2D.BucketSummary summary,
java.util.List<Feature>[] bucketFeatures,
float[] bucketIntensities,
boolean writePeptidesAndProteins,
boolean writeMultipleFeatures)
Create a single row for a peptide array. |
FeatureSet[] |
filterByGroupedAlignment(int minAligned)
Filter each FeatureSet to include only those features that align across at least minAligned sets. |
int |
getBucketEvaluationPeptideAgreementMatchScore()
|
double |
getBucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple()
|
double |
getBucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple()
|
int |
getBucketEvaluationPeptideAgreementMismatchPenalty()
|
int |
getConflictResolver()
|
int |
getElutionMode()
|
static Feature[] |
getFeatures(Clusterer2D.BucketSummary bucketSummary)
|
static java.util.List<Feature> |
getFeaturesFromSet(int setIndex,
Clusterer2D.BucketSummary bucketSummary)
|
boolean |
getGroupByMass()
|
int |
getMassType()
|
FeatureSet |
getSet(int i)
|
int |
numBuckets()
|
static java.util.List<Feature>[] |
orderClusterFeatures(Clusterer2D.BucketSummary cluster,
FeatureSet[] featureSetArray,
int conflictResolver)
Resolve conflicts between features in a cluster by ordering them along some metric Result is a list of Features in descending order of goodness |
static java.util.List<Feature>[] |
orderClusterFeatures(Clusterer2D.BucketSummary cluster,
java.util.List<FeatureSet> featureSets,
int conflictResolver)
Cover method |
int |
rowsWithOneFromEach()
|
void |
setBucketEvaluationPeptideAgreementMatchScore(int bucketEvaluationPeptideAgreementMatchScore)
|
void |
setBucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple(double bucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple)
|
void |
setBucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple(double bucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple)
|
void |
setBucketEvaluationPeptideAgreementMismatchPenalty(int bucketEvaluationPeptideAgreementMismatchPenalty)
|
void |
setConflictResolver(int conflictResolver)
|
void |
setElutionMode(int _elutionMode)
|
void |
setGroupByMass(boolean groupByMass)
|
void |
setMassType(int _massType)
|
void |
split2D(double dimension1Bucket,
double dimension2Bucket)
Split based on a set of bucket sizes. |
Clusterer2D.BucketSummary[] |
summarize()
|
void |
writeArrayDetails(java.io.PrintWriter writer,
boolean unDeconvolute,
boolean writeMS2)
Write out all feature details (except peptide, protein) |
protected void |
writeDetailsFeatureRow(java.io.PrintWriter writer,
int rowId,
java.lang.String setName,
Feature feature,
FeatureExtraInformationDef[] extraInfos)
Helper method to write a single row in a details file representing one feature |
void |
writePeptideArray(java.io.PrintWriter writer)
Old school entry point; never does normalization |
void |
writePeptideArray(java.io.PrintWriter writer,
boolean normalize)
by default, don't sum intensities |
void |
writePeptideArray(java.io.PrintWriter writer,
boolean normalize,
boolean sumIntensities)
Write out a peptide array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FeatureClusterer _featureClusterer
protected boolean _useMassInsteadOfMz
protected int _conflictResolver
public static final int BUCKET_EVALUATION_MODE_ONE_FROM_EACH
public static final int BUCKET_EVALUATION_MODE_PEPTIDE_AGREEMENT
protected double bucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple
protected double bucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple
protected int bucketEvaluationPeptideAgreementMatchScore
protected int bucketEvaluationPeptideAgreementMismatchPenalty
public static final int DEFAULT_PEPTIDE_AGREEMENT_MATCH_SCORE
public static final int DEFAULT_PEPTIDE_AGREEMENT_MISMATCH_PENALTY
public static final int CONFLICT_RESOLVER_SUM
public static final int CONFLICT_RESOLVER_BEST
public static final int DEFAULT_CONFLICT_RESOLVER
| Constructor Detail |
|---|
public FeatureGrouper()
public FeatureGrouper(FeatureSet fs,
boolean useMassForMz)
fs - useMassForMz - | Method Detail |
|---|
public Pair<java.lang.Double,java.lang.Integer> calculateBestBuckets(double[] massOrMzBuckets,
int[] scanBuckets)
massOrMzBuckets - scanBuckets -
public Pair<java.lang.Double,java.lang.Integer> calculateBestBuckets(double[] massOrMzBuckets,
int[] scanBuckets,
int bucketEvaluationMode)
public void writePeptideArray(java.io.PrintWriter writer)
public void writePeptideArray(java.io.PrintWriter writer,
boolean normalize)
writer - normalize - public static Feature[] getFeatures(Clusterer2D.BucketSummary bucketSummary)
public static java.util.List<Feature> getFeaturesFromSet(int setIndex,
Clusterer2D.BucketSummary bucketSummary)
public void writePeptideArray(java.io.PrintWriter writer,
boolean normalize,
boolean sumIntensities)
writer - normalize -
protected java.lang.String buildFeatureSetColumnSuffix(FeatureSet featureSet,
int featureSetNumber)
featureSet -
public FeatureSet[] filterByGroupedAlignment(int minAligned)
public static java.util.List<Feature>[] orderClusterFeatures(Clusterer2D.BucketSummary cluster,
java.util.List<FeatureSet> featureSets,
int conflictResolver)
cluster - featureSets - conflictResolver -
public static java.util.List<Feature>[] orderClusterFeatures(Clusterer2D.BucketSummary cluster,
FeatureSet[] featureSetArray,
int conflictResolver)
cluster - conflictResolver -
public Clusterer2D.BucketSummary[] summarize()
protected static java.lang.String createArrayRow(Clusterer2D.BucketSummary summary,
java.util.List<Feature>[] bucketFeatures,
float[] bucketIntensities,
boolean writePeptidesAndProteins,
boolean writeMultipleFeatures)
summary - bucketFeatures - bucketIntensities -
public void writeArrayDetails(java.io.PrintWriter writer,
boolean unDeconvolute,
boolean writeMS2)
writer - unDeconvolute - if false, writes out deconvoluted features.
If true, writes the original, un-deconvoluted features
protected void writeDetailsFeatureRow(java.io.PrintWriter writer,
int rowId,
java.lang.String setName,
Feature feature,
FeatureExtraInformationDef[] extraInfos)
writer - rowId - setName - feature -
public void split2D(double dimension1Bucket,
double dimension2Bucket)
dimension1Bucket - dimension2Bucket - public int numBuckets()
public int rowsWithOneFromEach()
public boolean getGroupByMass()
public void setGroupByMass(boolean groupByMass)
public void addSet(FeatureSet fs)
public FeatureSet getSet(int i)
public int getConflictResolver()
public void setConflictResolver(int conflictResolver)
public double getBucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple()
public void setBucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple(double bucketEvaluationPeptideAgreementMinAlignedNumSetsMultiple)
public double getBucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple()
public void setBucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple(double bucketEvaluationPeptideAgreementMinPeptideIdsNumSetsMultiple)
public int getBucketEvaluationPeptideAgreementMatchScore()
public void setBucketEvaluationPeptideAgreementMatchScore(int bucketEvaluationPeptideAgreementMatchScore)
public int getBucketEvaluationPeptideAgreementMismatchPenalty()
public void setBucketEvaluationPeptideAgreementMismatchPenalty(int bucketEvaluationPeptideAgreementMismatchPenalty)
public int getMassType()
public void setMassType(int _massType)
public int getElutionMode()
public void setElutionMode(int _elutionMode)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||