Commit a98d5157 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Add mashmap tool

parent 0c64d6e7
......@@ -4,7 +4,7 @@ import argparse
import wget
import os
VERSION = "1.0.1"
VERSION = "1.1.1"
parser = argparse.ArgumentParser(description="Split huge contigs")
parser.add_argument('-d', '--dir', type=str, required=False, help="Folder into store files", default=".")
......@@ -15,7 +15,7 @@ for file_dl in [
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/all_prepare.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/filter_contigs.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/index.py" % VERSION,
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/binsplit_fa.py" % VERSION
"https://raw.githubusercontent.com/genotoul-bioinfo/dgenies/v%s/src/dgenies/bin/split_fa.py" % VERSION
]:
d_file = os.path.join(args.dir, file_dl.rsplit("/", 1)[1])
print("Downloading %s..." % d_file)
......
......@@ -71,3 +71,13 @@ def maf(in_maf, out_paf):
else:
maf_f.close()
return True
def mashmap2paf(in_paf, out_paf):
with open(in_paf, "r") as in_p, open(out_paf, "w") as out_p:
for line in in_p:
parts = line.rstrip().split(" ")
parts[9] = str(round(float(parts[9]) / 100.0 * 1000.0))
parts.append("1000")
out_p.write("\t".join(parts) + "\n")
......@@ -9,3 +9,13 @@ minimap2:
help: "Better for low similar fasta files"
order: 0
mashmap:
exec: default
command_line: "{exe} -t {threads} -r {target} -q {query} -o {out}"
all_vs_all: !!null
max_memory: 20
threads: 8
parser: mashmap2paf
split_before: False
help: "Faster for high similar fasta files"
order: 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment