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:
parent
d17369e0ac
commit
eed32df30d
|
|
@ -56,9 +56,10 @@ public abstract class GenotypeLikelihoodsCalculationModel implements Cloneable {
|
|||
public enum Model {
|
||||
SNP,
|
||||
INDEL,
|
||||
BOTH,
|
||||
POOLSNP,
|
||||
POOLINDEL,
|
||||
BOTH
|
||||
POOLBOTH
|
||||
}
|
||||
|
||||
public enum GENOTYPING_MODE {
|
||||
|
|
|
|||
|
|
@ -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++)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue