<commit_before>#!/usr/bin/env python

import argparse, os.path, sys

from fastq2adjacency import fastq2adjacency

# Set up the command line parameters
parser = argparse.ArgumentParser(description="Load adjacency list into HDF5 file")
parser.add_argument("--genome", help="Genome name") #             default="GCA_000001405.22")
parser.add_argument("--dataset", help="Name of the dataset") #    default="GSE63525")
parser.add_argument("--sra_id", help="SRA ID") #                  default="SRR1658572")
parser.add_argument("--library", help="Library") #                default="HIC003")
parser.add_argument("--enzyme_name", help="Enzyme name (HboI)") # default="HboI")
parser.add_argument("--resolution", help="Resolution") #          default=1000000)
parser.add_argument("--tmp_dir", help="Temporary data dir")
parser.add_argument("--data_dir", help="Data directory; location of SRA FASTQ files")

# Get the matching parameters from the command line
args = parser.parse_args()

if len(sys.argv) < 9:
    parser.print_help()
    sys.exit(2)

genome      = args.genome
dataset     = args.dataset
sra_id      = args.sra_id
library     = args.library
enzyme_name = args.enzyme_name
resolution  = args.resolution
tmp_dir     = args.tmp_dir
data_dir    = args.data_dir


f2a = fastq2adjacency()

windows1 = ((1,25), (1,50), (1,75),(1,100))
windows2 = ((1,25), (1,50), (1,75),(1,100))
#windows2 = ((101,125), (101,150), (101,175),(101,200))
f2a.set_params(genome, dataset, sra_id, library, enzyme_name, resolution, tmp_dir, data_dir, False, windows1, windows1)

f2a.mapWindows(1)
f2a.mapWindows(2)

f2a.parseGenomeSeq()

f2a.parseMaps()

f2a.mergeMaps()

f2a.filterReads(conservative=True)

f2a.load_hic_data()

f2a.normalise_hic_data()

f2a.save_hic_data()<commit_msg>Change to test runnig this as a map call, which is able to get parellelised via COMPS<commit_after>#!/usr/bin/env python

import argparse, os.path, sys

from fastq2adjacency import fastq2adjacency

# Set up the command line parameters
parser = argparse.ArgumentParser(description="Load adjacency list into HDF5 file")
parser.add_argument("--genome", help="Genome name") #             default="GCA_000001405.22")
parser.add_argument("--dataset", help="Name of the dataset") #    default="GSE63525")
parser.add_argument("--sra_id", help="SRA ID") #                  default="SRR1658572")
parser.add_argument("--library", help="Library") #                default="HIC003")
parser.add_argument("--enzyme_name", help="Enzyme name (HboI)") # default="HboI")
parser.add_argument("--resolution", help="Resolution") #          default=1000000)
parser.add_argument("--tmp_dir", help="Temporary data dir")
parser.add_argument("--data_dir", help="Data directory; location of SRA FASTQ files")

# Get the matching parameters from the command line
args = parser.parse_args()

if len(sys.argv) < 9:
    parser.print_help()
    sys.exit(2)

genome      = args.genome
dataset     = args.dataset
sra_id      = args.sra_id
library     = args.library
enzyme_name = args.enzyme_name
resolution  = args.resolution
tmp_dir     = args.tmp_dir
data_dir    = args.data_dir


f2a = fastq2adjacency()

windows1 = ((1,25), (1,50), (1,75),(1,100))
windows2 = ((1,25), (1,50), (1,75),(1,100))
#windows2 = ((101,125), (101,150), (101,175),(101,200))
f2a.set_params(genome, dataset, sra_id, library, enzyme_name, resolution, tmp_dir, data_dir, False, windows1, windows1)

map(f2a.mapWindows, [1, 2])
#f2a.mapWindows(1)
#f2a.mapWindows(2)

f2a.parseGenomeSeq()

f2a.parseMaps()

f2a.mergeMaps()

f2a.filterReads(conservative=True)

f2a.load_hic_data()

f2a.normalise_hic_data()

f2a.save_hic_data()
{'fraction_non_alphanumeric': 0.1516822945394374, 'fraction_numerical': 0.059845559845559844, 'mean_word_length': 4.729857819905213, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2201358', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1294, 'n_words': 268}