#@author: Aleksey Komissarov #@contact: [email protected] import sys, os from trseeker.tools.jellyfish import sc_count_and_dump_kmers_for_file from PyBioSnippets.hiseq.fastq_tools import fastq_to_fasta import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='Count') parser.add_argument('-p','--prefix', help='Fastq file prefix', required=True) parser.add_argument('-k','--ksize', help='K', required=False, default=23) parser.add_argument('-m','--mintf', help='mintf', required=False, default=0) parser.add_argument('-d','--dumpmintf', help='dumpmintf', required=False, default=100) args = vars(parser.parse_args()) prefix = args["prefix"] k = args["ksize"] mintf = args["mintf"] dumpmintf = args["dumpmintf"] fastq_file = prefix + ".fastq" fasta_file = prefix + ".fa" jf_db = prefix + ".%s.jf" % k jf_dat = prefix + ".%s.dat" % k if os.path.isfile(fastq_file) and not os.path.isfile(fasta_file): fastq_to_fasta(fastq_file, fasta_file) sc_count_and_dump_kmers_for_file(fasta_file, ".", jf_db, jf_dat, k, mintf, dumpmintf)
#!/usr/bin/env python # -*- coding: utf-8 -*- # #@created: 10.10.2013 #@author: Aleksey Komissarov #@contact: [email protected] import sys from PyBioSnippets.hiseq.fastq_tools import fastq_to_fasta import argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='Convert fastq tp fasta.') parser.add_argument('-i','--input', help='Fastq file', required=True) parser.add_argument('-o','--output', help='Fasta output file', required=True) args = vars(parser.parse_args()) fastq_to_fasta(args["input"], args["output"])