From ffa215ec34076b6fcb5c61d73cff2e1c0eaafb10 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 29 Dec 2020 19:35:32 +0100 Subject: [PATCH] shebang and argument parsing improvements the removed test allows the --help and --version flags to work as expected. the change to the shebang lines allow to run the scripts on systems where python/perl is installed in different locations --- MITObim.pl | 6 ++---- misc_scripts/circules.py | 2 +- misc_scripts/downsample.py | 2 +- misc_scripts/get_wiggle.pl | 2 +- misc_scripts/interleave-fastqgz-MITOBIM.py | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/MITObim.pl b/MITObim.pl index 0ab9346..2aa6ea8 100755 --- a/MITObim.pl +++ b/MITObim.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl # # MITObim - mitochondrial baiting and iterative mapping # wrapper script version 1.9.1 @@ -71,9 +71,7 @@ # --insert insert size of illumina library, default=300, relevant only for proofreading -if (scalar @ARGV < 2){ - die "$PROGRAM\n$VERSION\n$USAGE"; -} + my $command = $0; for (@ARGV){ $command .= " $_"; diff --git a/misc_scripts/circules.py b/misc_scripts/circules.py index a1372df..bd6765e 100755 --- a/misc_scripts/circules.py +++ b/misc_scripts/circules.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import sys,warnings import argparse diff --git a/misc_scripts/downsample.py b/misc_scripts/downsample.py index 9581ac1..2507fda 100755 --- a/misc_scripts/downsample.py +++ b/misc_scripts/downsample.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """downsample diff --git a/misc_scripts/get_wiggle.pl b/misc_scripts/get_wiggle.pl index e09287d..ec616c6 100755 --- a/misc_scripts/get_wiggle.pl +++ b/misc_scripts/get_wiggle.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl # # script to extract per base coverage info for unpadded # assembly result from MIRA wiggle file diff --git a/misc_scripts/interleave-fastqgz-MITOBIM.py b/misc_scripts/interleave-fastqgz-MITOBIM.py index e9c5beb..11051f2 100755 --- a/misc_scripts/interleave-fastqgz-MITOBIM.py +++ b/misc_scripts/interleave-fastqgz-MITOBIM.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # encoding:utf8 # authors: Erik Garrison, Sébastien Boisvert # modified by github@cypridina on 20151104 to work with MITObim