Skip to content

Commit

Permalink
mashmap into pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry-Antipov committed May 31, 2024
1 parent f6da468 commit 2aba44e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Snakefiles/8-hicPipeline.sm
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ chmod +x ./prepare_hic.sh

rule runMashMap:
input:
unitigs_hpc = '8-hicPipeline/unitigs.hpc.fasta'
unitigs_hpc = '8-hicPipeline/unitigs.hpc.fasta',
unitigs = '8-hicPipeline/unitigs.fasta'
output:
unitigs_matches = '8-hicPipeline/unitigs.matches'
unitigs_matches = '8-hicPipeline/unitigs.matches',
unitigs_nohpc50 = '8-hicPipeline/unitigs_nonhpc50.mashmap'
log:
err = '8-hicPipeline/run_mashmap.err'
params:
Expand All @@ -104,6 +106,8 @@ set -e
echo "---Running MashMap"
{params.MASHMAP} -r ../{input.unitigs_hpc} -q ../{input.unitigs_hpc} -t {threads} -f none --pi {params.MASHMAP_DIV} -s 10000 -o mashmap.out
cat mashmap.out |awk '{{if (\$4-\$3 > 100000 && \$1 != \$6) print \$1"\\t"\$6"\\t"\$4-\$3}}'|sort |uniq > ../{output.unitigs_matches}
{params.MASHMAP} -r ../{input.unitigs_hpc} -q ../{input.unitigs_hpc} -t {threads} -f none --pi {params.MASHMAP_DIV} -s 10000 -o unitigs_nonhpc.mashmap
awk '$11 >= 50000' unitigs_nonhpc.mashmap > ../{output.unitigs_nohpc50}
EOF

chmod +x ./run_mashmap.sh
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/rdna_scaff.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@
rukki_paths = sf.read_rukki_paths(old_rukki_tsv_file, G)
gf.load_indirect_graph(gfa_file, indirectG)
#sf.try_to_scaff(rukki_paths, telomere_locations_file, os.path.join(hicrun_dir, "hic_mapping.byread.output"), os.path.join(hicrun_dir, "unitigs.matches"), G, indirectG, uncompressed_nodes)
sg = scaffold_graph.ScaffoldGraph(rukki_paths, telomere_locations_file, os.path.join(hicrun_dir, "hic_mapping.byread.output"), os.path.join(hicrun_dir, "mashmap_nonhpc50.out"), G, uncompressed_nodes, logger)
sg = scaffold_graph.ScaffoldGraph(rukki_paths, telomere_locations_file, os.path.join(hicrun_dir, "hic_mapping.byread.output"), os.path.join(hicrun_dir, "unitigs_nonhpc50.mashmap"), G, uncompressed_nodes, logger)
res = sg.generateScaffolds()

0 comments on commit 2aba44e

Please sign in to comment.