I have made a python code, which needs some arguments to be passed:
parser = argparse.ArgumentParser(description='RAPIT', formatter_class=RawTextHelpFormatter)
parser.add_argument("-f", "--fastq", help="Fastq_file location", required=True)
parser.add_argument("-w", "--workdir", default=cwd, help="Provide Working directory")
parser.add_argument("-c", "--cleanRUN", action="store_true", help="Delete SAM files")
parser.add_argument("-g", "--gtf", default="", help="GTF file location")
parser.add_argument("-s", "--starIndex", default="", help="STAR indexed genome location")
if len(sys.argv) == 1:
parser.print_help(sys.stderr)
sys.exit(1)
args = parser.parse_args()
When I call the main.py in a linux system I get this help:
usage: main.py -f FASTQ [-w WORKDIR] [-c] [-g GTF] [-s STARINDEX]
RAPIT
options:
-f FASTQ, --fastq FASTQ
Fastq_file location
-w WORKDIR, --workdir WORKDIR
Provide Working directory
-c, --cleanRUN Delete SAM files
-g GTF, --gtf GTF GTF file location
-s STARINDEX, --starIndex STARINDEX
STAR indexed genome location
This is not nice at all, and I wold like to know, why is for example "FASTQ" inserted between -f and --fastq?
Ideally I would like it to look like this:
-f, --fastq Fastq_file location
-w, --workdir Provide Working directory
etc
Can you please help me, what could be the problem? Thanks!