Mercurial > repos > sanbi-uwc > novo_align
diff novo_align.py @ 12:bfe39c503a40 draft
planemo upload for repository https://github.com/zipho/novo_align commit 896a5a73f2a5f71a7b38dc0403f54afba1f27643
author | sanbi-uwc |
---|---|
date | Tue, 29 Nov 2016 09:18:10 -0500 |
parents | 9a6f14e2c8fd |
children | 8553432eb6d8 |
line wrap: on
line diff
--- a/novo_align.py Thu Apr 07 09:55:31 2016 -0400 +++ b/novo_align.py Tue Nov 29 09:18:10 2016 -0500 @@ -3,9 +3,11 @@ import argparse import shlex import os +import sys import logging log = logging.getLogger( __name__ ) + def novo_align(output_filename, index_filename, fwd_file, rev_file ): param = r'@RG\tID:RG\tSM:$i\tPL:ILLUMINA' cmdline_str = "novoalign -c 8 -k -d {} -f {} {} -i PE 250, 100 -o SAM '{}' | samtools view -bS - > {}".format( @@ -19,6 +21,7 @@ except: print("Error running the nova-align", file=sys.stderr) + def newSplit(value): lex = shlex.shlex(value) lex.quotes = '"' @@ -26,6 +29,7 @@ lex.commenters = '' return list(lex) + def main(): parser = argparse.ArgumentParser(description="Generate a BAM file from the Novo Align tool") parser.add_argument('output_filename') @@ -33,9 +37,10 @@ parser.add_argument('--forward_filename') parser.add_argument('--reverse_filename') args = parser.parse_args() - + # a dirty way of referencing the file index_file_path = args.index_filename + "/" + args.index_filename.split("/")[-1] novo_align(args.output_filename, index_file_path, args.forward_filename, args.reverse_filename) -if __name__ == "__main__": main() +if __name__ == "__main__": + main()