<commit_before>#! /usr/bin/python

import os
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__));

import sys;
sys.path.append(SCRIPT_PATH + '/../src');

import subprocess;
import multiprocessing;

import basicdefines;

ALIGNER_URL = 'https://github.com/isovic/graphmap.git';
ALIGNER_PATH = SCRIPT_PATH + '/../aligners/graphmap/';
BIN = 'bin/Linux-x64/graphmap';
MAPPER_NAME = 'GraphMap';

# Function 'run' should provide a standard interface for running a mapper. Given input parameters, it should run the
# alignment process, and convert any custom output results to the SAM format. Function should return a string with the
# path to the output file.
#	reads_file			Path to a FASTA/FASTQ file containing reads.
#	reference_file		Path to a reference genome FASTA file.
#	machine_name		A symbolic name to specify a set of parameters for a specific sequencing platform.
#	output_path			Folder to which the output will be placed to. Filename will be automatically generated according to the name of the mapper being run.
#	output_suffix		A custom suffix that can be added to the output filename.
def run(reads_file, reference_file, machine_name, output_path, output_suffix=''):
	parameters = '';
	num_threads = multiprocessing.cpu_count() / 2;

	if ((machine_name.lower() == 'illumina') or (machine_name.lower() == 'roche')):
		# parameters = '-x illumina -v 5 -b 4 -B 0';
		parameters = '-x illumina -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'pacbio')):
		# parameters = '-v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'nanopore')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'nanoporecirc')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -C -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'myers')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a myers -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w edlib -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'gotoh')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a gotoh -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w seqan -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'anchor')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a anchor -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w anchor -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'anchorgotoh')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a anchorgotoh -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w anchor -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'metagen')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';<commit_msg>Added a rule for wrapper_graphmap.py (anchorcirc).<commit_after>#! /usr/bin/python

import os
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__));

import sys;
sys.path.append(SCRIPT_PATH + '/../src');

import subprocess;
import multiprocessing;

import basicdefines;

ALIGNER_URL = 'https://github.com/isovic/graphmap.git';
ALIGNER_PATH = SCRIPT_PATH + '/../aligners/graphmap/';
BIN = 'bin/Linux-x64/graphmap';
MAPPER_NAME = 'GraphMap';

# ALIGNER_PATH = '/home/isovic/work/eclipse-workspace/graphmap/';
# BIN = 'bin/graphmap-not_release';

# ALIGNER_PATH = '/home/isovic/work/eclipse-workspace/temp2/graphmap/';
# BIN = 'bin/Linux-x64/graphmap';

# Function 'run' should provide a standard interface for running a mapper. Given input parameters, it should run the
# alignment process, and convert any custom output results to the SAM format. Function should return a string with the
# path to the output file.
#	reads_file			Path to a FASTA/FASTQ file containing reads.
#	reference_file		Path to a reference genome FASTA file.
#	machine_name		A symbolic name to specify a set of parameters for a specific sequencing platform.
#	output_path			Folder to which the output will be placed to. Filename will be automatically generated according to the name of the mapper being run.
#	output_suffix		A custom suffix that can be added to the output filename.
def run(reads_file, reference_file, machine_name, output_path, output_suffix=''):
	parameters = '';
	num_threads = multiprocessing.cpu_count() / 2;

	if ((machine_name.lower() == 'illumina') or (machine_name.lower() == 'roche')):
		# parameters = '-x illumina -v 5 -b 4 -B 0';
		parameters = '-x illumina -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'pacbio')):
		# parameters = '-v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'nanopore')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'nanoporecirc')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-v 5 -t %d -C -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'myers')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a myers -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w edlib -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'gotoh')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a gotoh -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w seqan -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'anchor')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a anchor -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w anchor -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'anchorcirc')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a anchor -C -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w anchor -v 5 -t %d -B 0 -b 3' % num_threads;
		
	elif ((machine_name.lower() == 'anchorgotoh')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
		parameters = '-a anchorgotoh -v 5 -t %d -B 0 -b 3' % num_threads;
		# parameters = '-w anchor -v 5 -t %d -B 0 -b 3' % num_threads;

	elif ((machine_name.lower() == 'metagen')):
		# parameters = '-x nanopore -v 5 -b 4 -B 0';
{'fraction_non_alphanumeric': 0.15618955512572533, 'fraction_numerical': 0.02321083172147002, 'mean_word_length': 3.1784511784511786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7221879', 'n_tokens_mistral': 2488, 'n_tokens_neox': 2224, 'n_words': 833}