INNER CODE UNIT · Python
test_rnaseqc
getzlab/rnaseqc · python/rnaseqc/run.py:24
def test_rnaseqc(path):
return os.path.isfile(path) and os.access(path, os.X_OK) and subprocess.run([path, '--version'], stdout=subprocess.PIPE).stdout.startswith(b'RNASeQC 2')
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Wrapper for RNA-SeQC 2')
parser.add_argument('genes_gtf', type=str, help='Gene annotation GTF')
parser.add_argument('bam_file', type=str, help='BAM file')
parser.add_argument('prefix', type=str, default='Reads', help='Prefix for output files; usually sample_id')
parser.add_argument('-o', '--output_dir', default=os.getcwd(), help='Output directory')
parser.add_argument('-q', '--mapping-quality', default=None, type=int, help="Lower bound on read quality for reads used in coverage metrics")
parser.add_argument('-m', '--mismatch-threshold', default=None, type=int, help="Maximum allowed mismatches in a read while still used for coverage metrics")
parser.add_argument('-c', '--coverage', action='store_true', help="Include raw coverage metrics in a separate output table. By default, only summary statistics are included in metrics")
parser.add_argument('--stranded', default=None, choices=['rf', 'fr'], help='Strandedness for stranded libraries')
parser.add_argument('--bed', default=None, help='BED file with intervals for estimating insert size distribution')
args = parser.parse_args()
print('['+datetime.now().strftime("%b %d %H:%M:%S")+'] Running RNA-SeQC', flush=True)