Skip to content

Commit

Permalink
bug fix on argument parser
Browse files Browse the repository at this point in the history
  • Loading branch information
evantarbell committed Nov 28, 2018
1 parent 64aec30 commit 723bb70
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/HMMR_ATAC/ArgParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ArgParser {
private File bam = null;
private File index = null;
private String genomeFile = null;
private String bigWig = null;
//private String bigWig = null;

//Optional Inputs
private String means;//comma separted list of intial mean values for frag dist
Expand Down Expand Up @@ -77,7 +77,7 @@ public ArgParser(String[] a){
* Access the bigwig file
* @return a String representing the bigwig file
*/
public String getBigWig(){return bigWig;}
// public String getBigWig(){return bigWig;}
/**
* Access the means of the mixture model
* @return a String representing the means of the mixture model
Expand Down Expand Up @@ -170,6 +170,9 @@ public ArgParser(String[] a){
private void set(){
for (int i = 0; i < args.length; i++) {

switch (args[i].charAt(0)){
case'-':

switch (args[i].charAt((1))) {

case'b':
Expand All @@ -184,10 +187,10 @@ private void set(){
genomeFile = args[i+1];
i++;
break;
case'w':
bigWig = args[i+1];
i++;
break;
// case'w':
// bigWig = args[i+1];
// i++;
// break;
case'm':
means = args[i+1];
i++;
Expand Down Expand Up @@ -262,10 +265,10 @@ private void set(){
genomeFile = args[i+1];
i++;
break;
case"wig":
bigWig = args[i+1];
i++;
break;
// case"wig":
// bigWig = args[i+1];
// i++;
// break;
case"means":
means = args[i+1];
i++;
Expand Down Expand Up @@ -372,6 +375,7 @@ private void set(){
}
}
}
}//for loop
}
/**
* Print usage statement
Expand All @@ -382,7 +386,7 @@ public void printUsage(){
System.out.println("\t-b , --bam <BAM> Sorted BAM file containing the ATAC-seq reads");
System.out.println("\t-i , --index <BAI> Index file for the sorted BAM File");
System.out.println("\t-g , --genome <GenomeFile> Two column, tab delimited file containing genome size stats");
System.out.println("\t-w , --wig <BigWig> Whole genome big wig file created using all reads");
// System.out.println("\t-w , --wig <BigWig> Whole genome big wig file created using all reads");
System.out.println("\nOptional Parameters:");
System.out.println("\t-m , --means <double> Comma separated list of initial mean values for the fragment distribution. Default = 50,200,400,600");
System.out.println("\t-s , --stddev <double> Comma separated list of initial standard deviation values for fragment distribution. Default = 20,20,20,20");
Expand Down

0 comments on commit 723bb70

Please sign in to comment.