# HG changeset patch # User lijing # Date 1509641334 14400 # Node ID e93ae41761271e72a8ff52aded4fad2affc8e63e # Parent c267c8a8ec1283a77dcf63d78eaaecf621e6975a Uploaded a set of tools diff -r c267c8a8ec12 -r e93ae4176127 ._MITObim_1.8.pl Binary file ._MITObim_1.8.pl has changed diff -r c267c8a8ec12 -r e93ae4176127 ._consense.xml Binary file ._consense.xml has changed diff -r c267c8a8ec12 -r e93ae4176127 ._dnapars.xml Binary file ._dnapars.xml has changed diff -r c267c8a8ec12 -r e93ae4176127 ._interleave-fastqgz-MITOBIM.py Binary file ._interleave-fastqgz-MITOBIM.py has changed diff -r c267c8a8ec12 -r e93ae4176127 ._interleave.xml Binary file ._interleave.xml has changed diff -r c267c8a8ec12 -r e93ae4176127 ._mitobim.xml Binary file ._mitobim.xml has changed diff -r c267c8a8ec12 -r e93ae4176127 ._seqboot.xml Binary file ._seqboot.xml has changed diff -r c267c8a8ec12 -r e93ae4176127 home/lijing/galaxy/tools/ngs_mapping/interleave-fastqgz-MITOBIM.py --- a/home/lijing/galaxy/tools/ngs_mapping/interleave-fastqgz-MITOBIM.py Thu Nov 02 12:45:03 2017 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -#!/usr/bin/python -# encoding:utf8 -# authors: Erik Garrison, Sébastien Boisvert -# modified by github@cypridina on 20151104 to work with MITObim -"""This script takes two fastq or fastq.gz files and interleaves them -Usage: - interleave-fasta fasta_file1 fasta_file2 -""" - -import sys,re - -def interleave(f1, f2): - """Interleaves two (open) fastq files. - """ - while True: - line = f1.readline() - if line.strip() == "": - break - print re.sub(r" 1:N.*", "/1",line.strip()) - - for i in xrange(3): - print re.sub(r" 2:N.*","/2",f1.readline().strip()) - - for i in xrange(4): - print re.sub(r" 2:N.*","/2",f2.readline().strip()) - -if __name__ == '__main__': - try: - file1 = sys.argv[1] - file2 = sys.argv[2] - except: - print __doc__ - sys.exit(1) - - if file1[-2:] == "gz": - import gzip - with gzip.open(file1) as f1: - with gzip.open(file2) as f2: - interleave(f1, f2) - else: - with open(file1) as f1: - with open(file2) as f2: - interleave(f1, f2) - f1.close() - f2.close()