|
41 | 41 | The arguments can be given in any order.", |
42 | 42 | prog="4Pipe4", |
43 | 43 | formatter_class=RawTextHelpFormatter) |
44 | | -parser.add_argument("-i", dest="infile", nargs=1, required=True, |
| 44 | + |
| 45 | +group = parser.add_mutually_exclusive_group(required=True) |
| 46 | +group.add_argument("-i", dest="infile", nargs=1, required=False, |
45 | 47 | help="Provide the full path to your target input file\n", |
46 | 48 | metavar="input_file") |
| 49 | +group.add_argument("-p", dest="infile", nargs=2, required=False, |
| 50 | + help="Provide the full path to your target input pair files\n", |
| 51 | + metavar="input_pair") |
| 52 | + |
47 | 53 | parser.add_argument("-o", dest="outfile", nargs=1, required=True, |
48 | 54 | help="Provide the full path to your results directory, \ |
49 | 55 | plus the name you want to give your results\n", |
|
66 | 72 | parser.add_argument("-d", dest="datatype", nargs=1, help="Declare the type of \ |
67 | 73 | data being used. Currentlly suported are 454 (454) and Illumina (solexa). \ |
68 | 74 | Default is 454.", required=False, metavar="454/solexa", default="454") |
69 | | -parser.add_argument("-p", dest="paired", nargs="?", default=False, type=bool, |
70 | | - help="Is the data paired end? True/False, default is \ |
71 | | - False.", required=False, metavar="True/False") |
| 75 | +# parser.add_argument("-p", dest="paired", nargs="?", default=False, type=bool, |
| 76 | +# help="Is the data paired end? True/False, default is \ |
| 77 | +# False.", required=False, metavar="True/False") |
72 | 78 | arg = parser.parse_args() |
73 | 79 |
|
74 | 80 |
|
@@ -96,7 +102,7 @@ def StartUp(): |
96 | 102 | if arg.datatype == "solexa": |
97 | 103 | if "1" in arg.run_list or "2" in arg.run_list: |
98 | 104 | quit("Please skip steps 1 and 2 for illumina data. They are not required.") |
99 | | - if arg.infile.endswith("fastq") is False or arg.infile.endswith("fasq.gz") is False: |
| 105 | + if arg.infile.endswith("fastq") is False or arg.infile.endswith("fastq.gz") is False: |
100 | 106 | quit("Infile must be in 'fastq' format for illumina data.") |
101 | 107 | if os.path.isfile(basefile + ".fastq"): |
102 | 108 | if basefile + ".fastq" == input_file: |
@@ -452,4 +458,5 @@ def RunMe(arguments): |
452 | 458 |
|
453 | 459 | basefile, sff, config = StartUp() |
454 | 460 | miraproject = SysPrep(basefile) |
| 461 | +print(arg.infile) |
455 | 462 | RunMe(arg.run_list) |
0 commit comments