Is it possible to have an argument parser like this?
import argparse
parser.add_argument('query2target.bam', help='A bam file containing contigs from \'query\' aligned to contigs in \'target\'')
args = parser.parse_args()
q2t = args.query2target.bam
I want the parser name to be ‘query2target.bam’ but then when I go to name a variable after it, q2t = args.query2target.bam it thinks that the extension is a function method. How do I solve this without renaming the argument?
Never mind my previous answer. There actually is a clean solution to this problem; writing a custom action for the
ArgumentParser: