Skip to content

Commit

Permalink
Neo: removed redundant wildtype match field
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesshale committed Nov 2, 2021
1 parent 4df24d4 commit 5148840
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public class NeoEpitopeFile
public final String[] CodingBaseCigars;
public final double[] CancerTpmTotal;
public final double[] CohortTpmTotal;
public final boolean WildtypeNovelAAMatch;

public static final String FLD_NE_ID = "NeId";
public static final String FLD_NE_VAR_TYPE = "VariantType";
Expand All @@ -74,7 +73,7 @@ public NeoEpitopeFile(
final String transcriptsUp, final String transcriptsDown, final String wildtypeAAs,
int codingBaseUpPosStart, int codingBaseUpPosEnd, final String codingBasesUp, final String codingBaseCigarUp,
int codingBaseDownPosStart, int codingBaseDownPosEnd, final String codingBasesDown, final String codingBaseCigarDown,
double tmpCancerUp, double tmpCohortUp, double tmpCancerDown, double tmpCohortDown, boolean wildtypeNovelAAMatch)
double tmpCancerUp, double tmpCohortUp, double tmpCancerDown, double tmpCohortDown)
{
Id = id;
VariantType = varType;
Expand All @@ -101,7 +100,6 @@ public NeoEpitopeFile(
CodingBasePositions[FS_DOWN] = new int[] {codingBaseDownPosStart, codingBaseDownPosEnd};
CancerTpmTotal = new double[] { tmpCancerUp, tmpCohortUp };
CohortTpmTotal = new double[] { tmpCancerDown, tmpCohortDown };
WildtypeNovelAAMatch = wildtypeNovelAAMatch;
}

private static final String FILE_EXTENSION = ".neo.neoepitopes.csv";
Expand Down Expand Up @@ -190,7 +188,6 @@ private static List<NeoEpitopeFile> fromLines(@NotNull List<String> lines)
int tpmCohUpIndex = fieldsIndexMap.get("TpmCohortUp");
int tpmCanDownIndex = fieldsIndexMap.get("TpmCancerDown");
int tpmCohDownIndex = fieldsIndexMap.get("TpmCohortDown");
int wtNovelAaIndex = fieldsIndexMap.get("WildtypeNovelAAMatch");

for(String line : lines)
{
Expand All @@ -209,7 +206,7 @@ private static List<NeoEpitopeFile> fromLines(@NotNull List<String> lines)
Integer.parseInt(values[cbUpPosStartIndex]), Integer.parseInt(values[cbUpPosEndIndex]), values[cbUpIndex], values[cbCigUpIndex],
Integer.parseInt(values[cbDownPosStartIndex]), Integer.parseInt(values[cbDownPosEndIndex]), values[cbDownIndex], values[cbCigDownIndex],
Double.parseDouble(values[tpmCanUpIndex]), Double.parseDouble(values[tpmCohUpIndex]),
Double.parseDouble(values[tpmCanDownIndex]), Double.parseDouble(values[tpmCohDownIndex]), Boolean.parseBoolean(values[wtNovelAaIndex])));
Double.parseDouble(values[tpmCanDownIndex]), Double.parseDouble(values[tpmCohDownIndex])));
}
catch(Exception e)
{
Expand Down Expand Up @@ -261,7 +258,6 @@ public static String header()
.add("TpmCohortUp")
.add("TpmCancerDown")
.add("TpmCohortDown")
.add("WildtypeNovelAAMatch")
.toString();
}

Expand Down Expand Up @@ -307,11 +303,11 @@ public static String toString(@NotNull final NeoEpitopeFile neo)
sj.add(String.format("%6.3e", neo.CohortTpmTotal[FS_UP]));
sj.add(String.format("%6.3e", neo.CancerTpmTotal[FS_DOWN]));
sj.add(String.format("%6.3e", neo.CohortTpmTotal[FS_DOWN]));
sj.add(String.valueOf(neo.WildtypeNovelAAMatch));

return sj.toString();
}

/*
@NotNull
public static NeoEpitopeFile fromString(@NotNull final String data, boolean skipSampleId)
{
Expand All @@ -333,8 +329,9 @@ public static NeoEpitopeFile fromString(@NotNull final String data, boolean skip
Integer.parseInt(values[index++]), Integer.parseInt(values[index++]), values[index++], values[index++],
Integer.parseInt(values[index++]), Integer.parseInt(values[index++]), values[index++], values[index++],
Double.parseDouble(values[index++]), Double.parseDouble(values[index++]),
Double.parseDouble(values[index++]), Double.parseDouble(values[index++]), Boolean.parseBoolean(values[index++]));
Double.parseDouble(values[index++]), Double.parseDouble(values[index++]));
}
*/

public static String pointMutationInfo(final String chromosome, int position, final String ref, final String alt)
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.commons.cli.ParseException;
import org.jetbrains.annotations.NotNull;

//
public class NeoScorer
{
private final NeoScorerConfig mConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public class NeoConfig
public static final String WRITE_PEPTIDES = "write_peptides";
public static final String WRITE_TRANS_DATA = "write_trans_data";

public static final String NEO_EPITOPE_FILE_ID = ".neo.neoepitopes.csv";
public static final String HLA_PEPTIDE_FILE_ID = ".neo.hla_peptides.csv";

public static final int DEFAULT_AMINO_ACID_REF_COUNT = 18;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,6 @@ refGenome, TransData[FS_UP], chromosome(FS_UP), upstreamAAPosStart, wtOrient,

public abstract void setSkippedSpliceSites(final EnsemblDataCache geneTransCache);

public boolean matchesAminoAcids(final NeoEpitope other)
{
return UpstreamAcids.equals(other.UpstreamAcids) && DownstreamAcids.equals(other.DownstreamAcids) && NovelAcid.equals(other.NovelAcid);
}

public String aminoAcidString() { return UpstreamAcids + NovelAcid + DownstreamAcids; }

public boolean hasWildtypeAminoAcidMatch()
Expand Down Expand Up @@ -286,6 +281,6 @@ TransData[FS_UP].GeneId, TransData[FS_DOWN].GeneId, geneName(FS_UP), geneName(FS
ExtPositions[FS_UP][SE_START], ExtPositions[FS_UP][SE_END], ExtCodingBases[FS_UP], ExtCigars[FS_UP].toString(),
ExtPositions[FS_DOWN][SE_START], ExtPositions[FS_DOWN][SE_END], ExtCodingBases[FS_DOWN],
ExtCigars[FS_DOWN] != null ? ExtCigars[FS_DOWN].toString() : "",
tpmCancer[FS_UP], tpmCohort[FS_UP], tpmCancer[FS_DOWN], tpmCohort[FS_DOWN], hasWildtypeAminoAcidMatch());
tpmCancer[FS_UP], tpmCohort[FS_UP], tpmCancer[FS_DOWN], tpmCohort[FS_DOWN]);
}
}
Loading

0 comments on commit 5148840

Please sign in to comment.