A convenience argument - for Mark - so that you don't have to specify all the output file names
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1442 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
5725de56dc
commit
1d74143ef4
|
|
@ -18,6 +18,8 @@ import java.io.PrintWriter;
|
||||||
*/
|
*/
|
||||||
@Requires(value={DataSource.REFERENCE},referenceMetaData={@RMD(name="callset1",type=AllelicVariant.class),@RMD(name="callset2",type=AllelicVariant.class)})
|
@Requires(value={DataSource.REFERENCE},referenceMetaData={@RMD(name="callset1",type=AllelicVariant.class),@RMD(name="callset2",type=AllelicVariant.class)})
|
||||||
public class VennCallSetsWalker extends RefWalker<Integer, Integer> {
|
public class VennCallSetsWalker extends RefWalker<Integer, Integer> {
|
||||||
|
@Argument(fullName="outputPrefix", shortName="prefix", doc="File prefix for output; turns on ALL output options below", required=false)
|
||||||
|
private String PREFIX = null;
|
||||||
@Argument(fullName="union_out", shortName="union", doc="File to which union of sets should be written", required=false)
|
@Argument(fullName="union_out", shortName="union", doc="File to which union of sets should be written", required=false)
|
||||||
String UNION_OUT = null;
|
String UNION_OUT = null;
|
||||||
@Argument(fullName="intersect_out", shortName="intersect", doc="File to which intersection of sets should be written", required=false)
|
@Argument(fullName="intersect_out", shortName="intersect", doc="File to which intersection of sets should be written", required=false)
|
||||||
|
|
@ -37,18 +39,22 @@ public class VennCallSetsWalker extends RefWalker<Integer, Integer> {
|
||||||
*/
|
*/
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
try {
|
try {
|
||||||
if ( UNION_OUT != null ) {
|
if ( UNION_OUT != null )
|
||||||
union_writer = new PrintWriter(UNION_OUT);
|
union_writer = new PrintWriter(UNION_OUT);
|
||||||
}
|
else if ( PREFIX != null )
|
||||||
if ( INTERSECTION_OUT != null ) {
|
union_writer = new PrintWriter(PREFIX + ".union.calls");
|
||||||
|
if ( INTERSECTION_OUT != null )
|
||||||
intersect_writer = new PrintWriter(INTERSECTION_OUT);
|
intersect_writer = new PrintWriter(INTERSECTION_OUT);
|
||||||
}
|
else if ( PREFIX != null )
|
||||||
if ( SET1_OUT != null ) {
|
intersect_writer = new PrintWriter(PREFIX + ".intersect.calls");
|
||||||
|
if ( SET1_OUT != null )
|
||||||
set1_writer = new PrintWriter(SET1_OUT);
|
set1_writer = new PrintWriter(SET1_OUT);
|
||||||
}
|
else if ( PREFIX != null )
|
||||||
if ( SET2_OUT != null ) {
|
set1_writer = new PrintWriter(PREFIX + ".set1Only.calls");
|
||||||
|
if ( SET2_OUT != null )
|
||||||
set2_writer = new PrintWriter(SET2_OUT);
|
set2_writer = new PrintWriter(SET2_OUT);
|
||||||
}
|
else if ( PREFIX != null )
|
||||||
|
set2_writer = new PrintWriter(PREFIX + ".set2Only.calls");
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new StingException(String.format("Could not open file(s) for writing"));
|
throw new StingException(String.format("Could not open file(s) for writing"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue