a) Sanity check in PoolCaller: if user didn't specify correct -glm or -pnrm models then error out with useful message, b) Have VariantsToTable deal with case where sample namess have spaces: technically they're allowed (or at least not explicitly forbidden) but they'll produce R-incompatible tables. TBD which other tools have issues, or whether there's a generic fix for this

This commit is contained in:
Guillermo del Angel 2012-06-21 21:19:55 -04:00
parent d17369e0ac
commit eed32df30d
2 changed files with 5 additions and 3 deletions

View File

@ -56,9 +56,10 @@ public abstract class GenotypeLikelihoodsCalculationModel implements Cloneable {
public enum Model {
SNP,
INDEL,
BOTH,
POOLSNP,
POOLINDEL,
BOTH
POOLBOTH
}
public enum GENOTYPING_MODE {

View File

@ -232,7 +232,8 @@ public class VariantsToTable extends RodWalker<Integer, Integer> {
firstEntry = false;
else
sb.append("\t");
sb.append(sample);
// spaces in sample names are legal but wreak havoc in R data frames
sb.append(sample.replace(" ","_"));
sb.append(".");
sb.append(gf);
}
@ -247,7 +248,7 @@ public class VariantsToTable extends RodWalker<Integer, Integer> {
}
for ( final String sample : samples ) {
for ( final String gf : genotypeFieldsToTake ) {
out.println(String.format("%d\t%s\t%s\t%s", nRecords, sample, gf, record.get(index++)));
out.println(String.format("%d\t%s\t%s\t%s", nRecords, sample.replace(" ","_"), gf, record.get(index++)));
}
}
}