diff --git a/CheckFingerprintVCF/CheckFingerprintVCF.nf b/CheckFingerprintVCF/CheckFingerprintVCF.nf index a037a67..d02d0ab 100644 --- a/CheckFingerprintVCF/CheckFingerprintVCF.nf +++ b/CheckFingerprintVCF/CheckFingerprintVCF.nf @@ -15,6 +15,6 @@ process CheckFingerprintVCF { script: """ - python ${baseDir}/CustomModules/CheckFingerprintVCF/check_fingerprint_vcf.py -o logbook.txt ${vcf_files} + python ${projectDir}/CustomModules/CheckFingerprintVCF/check_fingerprint_vcf.py -o logbook.txt ${vcf_files} """ } diff --git a/CheckQC/CheckQC.nf b/CheckQC/CheckQC.nf index 19dbddd..0dbf4d7 100644 --- a/CheckQC/CheckQC.nf +++ b/CheckQC/CheckQC.nf @@ -13,6 +13,6 @@ process CheckQC { script: """ - python ${baseDir}/CustomModules/CheckQC/check_qc.py ${params.qc_settings_path} '.' ${identifier} ${input_files} + python ${projectDir}/CustomModules/CheckQC/check_qc.py ${params.qc_settings_path} '.' ${identifier} ${input_files} """ } diff --git a/ClarityEpp/SampleIndications.nf b/ClarityEpp/SampleUDFDx.nf similarity index 56% rename from ClarityEpp/SampleIndications.nf rename to ClarityEpp/SampleUDFDx.nf index ac46efa..abdae6f 100644 --- a/ClarityEpp/SampleIndications.nf +++ b/ClarityEpp/SampleUDFDx.nf @@ -1,8 +1,8 @@ -process SampleIndications { - // Custom process to run clarity_epp export sample_indications - tag {"ClarityEpp SampleIndications ${sample_id}"} +process SampleUDFDx { + // Custom process to run clarity_epp export sample_udf_dx + tag {"ClarityEpp SampleUDFDx ${sample_id}"} label 'ClarityEpp' - label 'ClarityEpp_SampleIndications' + label 'ClarityEpp_SampleUDFDx' shell = ['/bin/bash', '-eo', 'pipefail'] cache = false //Disable cache to force a clarity export restarting the workflow. @@ -15,7 +15,7 @@ process SampleIndications { script: """ source ${params.clarity_epp_path}/venv/bin/activate - python ${params.clarity_epp_path}/clarity_epp.py export sample_indications \ - -a ${sample_id} | cut -f 2 | grep -v 'Indication' | tr -d '\n' + python ${params.clarity_epp_path}/clarity_epp.py export sample_udf_dx \ + -a ${sample_id} -u '$params.udf' -c '$params.column_name' | cut -f 2 | grep -v $params.column_name | tr -d '\n' """ -} \ No newline at end of file +} diff --git a/GenderCheck/CompareGender.nf b/GenderCheck/CompareGender.nf new file mode 100644 index 0000000..fdfc495 --- /dev/null +++ b/GenderCheck/CompareGender.nf @@ -0,0 +1,27 @@ +process CompareGender { + // Custom process to check gender of sample with known status + tag {"CompareGender ${sample_id}"} + label 'CompareGender' + label 'CompareGender_Pysam' + container = 'ghcr.io/umcugenetics/custommodules_gendercheck:1.0.0' + shell = ['/bin/bash', '-eo', 'pipefail'] + + input: + tuple(val(sample_id), val(analysis_id), path(bam_file), path(bai_file), val(true_gender)) + + output: + tuple(path("*gendercheck.txt"), emit: gendercheck_qc) + + script: + """ + python ${projectDir}/CustomModules/GenderCheck/calculate_gender.py \ + ${sample_id} \ + ${analysis_id} \ + ${bam_file} \ + ./ \ + ${true_gender} \ + $params.gendercheck_ratio_y \ + $params.gendercheck_mapping_qual \ + $params.gendercheck_locus_y + """ +} diff --git a/GenderCheck/Dockerfile b/GenderCheck/Dockerfile new file mode 100644 index 0000000..6d4895c --- /dev/null +++ b/GenderCheck/Dockerfile @@ -0,0 +1,11 @@ +################## BASE IMAGE ###################### +FROM --platform=linux/amd64 python:3.11 + +################## METADATA ###################### +LABEL base_image="python:3.11" +LABEL version="1.0.0" +LABEL extra.binaries="pysam,pytest" + +################## INSTALLATIONS ###################### +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt \ No newline at end of file diff --git a/GenderCheck/calculate_gender.py b/GenderCheck/calculate_gender.py new file mode 100644 index 0000000..c210acc --- /dev/null +++ b/GenderCheck/calculate_gender.py @@ -0,0 +1,64 @@ +#! /usr/bin/env python3 + +import argparse +import pysam + + +def is_valid_read(read, mapping_qual): + """Check if a read is properly mapped.""" + if (read.mapping_quality >= mapping_qual and read.reference_end and read.reference_start): + return True + return False + + +def get_gender_from_bam(bam, mapping_qual, locus_y, ratio_y): + with pysam.AlignmentFile(bam, "rb") as bam_file: + y_reads = float( + sum([is_valid_read(read, mapping_qual) for read in bam_file.fetch(region=locus_y)]) + ) + total_reads = float(bam_file.mapped) + y_ratio_perc = (y_reads / total_reads) * 100 + if y_ratio_perc <= ratio_y: + return "female" + else: + return "male" + + +def compare_gender(sample_id, analysis_id, test_gender, true_gender): + if test_gender == true_gender or true_gender == "unknown": # if gender if unknown/onbekend in database, pass + qc = "PASS" + else: # not_detected in database considered failed + qc = "FAIL" + return f"{sample_id}\t{analysis_id}\t{test_gender}\t{true_gender}\t{qc}\n" + + +def write_qc_file(sample_id, analysis_id, comparison, outputfolder): + with open(f"{outputfolder}/{sample_id}_{analysis_id}_gendercheck.txt", 'w') as write_file: + write_file.write("sample_id\tanalysis_id\ttest_gender\ttrue_gender\tstatus\n") + write_file.write(comparison) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('sample_id', help='sample_id') + parser.add_argument('analysis_id', help='analysis_id') + parser.add_argument('bam', help='path to bam file') + parser.add_argument('outputfolder', help='path to output folder') + parser.add_argument('true_gender', help='gender regarded as the truth') + parser.add_argument( + "ratio_y", + type=float, + help="maximunum chromosome Y ratio for females [float]" + ) + parser.add_argument('mapping_qual', type=int, help='minimum mapping quality of reads to be considered [int]') + parser.add_argument('locus_y', help='Coordinates for includes region on chromosome Y (chr:start-stop)') + args = parser.parse_args() + + translation = {"Man": "male", "Vrouw": "female", "Onbekend": "unknown", "unknown": "not_detected"} + true_gender = args.true_gender + if true_gender in translation: + true_gender = translation[true_gender] + + test_gender = get_gender_from_bam(args.bam, args.mapping_qual, args.locus_y, args.ratio_y) + comparison = compare_gender(args.sample_id, args.analysis_id, test_gender, true_gender) + write_qc_file(args.sample_id, args.analysis_id, comparison, args.outputfolder) diff --git a/GenderCheck/requirements.txt b/GenderCheck/requirements.txt new file mode 100644 index 0000000..7664a68 --- /dev/null +++ b/GenderCheck/requirements.txt @@ -0,0 +1,5 @@ +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +pysam==0.22.0 +pytest==8.0.2 \ No newline at end of file diff --git a/GenderCheck/test_bam.bam b/GenderCheck/test_bam.bam new file mode 100644 index 0000000..e2ecb32 Binary files /dev/null and b/GenderCheck/test_bam.bam differ diff --git a/GenderCheck/test_bam.bam.bai b/GenderCheck/test_bam.bam.bai new file mode 100644 index 0000000..ec3720d Binary files /dev/null and b/GenderCheck/test_bam.bam.bai differ diff --git a/GenderCheck/test_calculate_gender.py b/GenderCheck/test_calculate_gender.py new file mode 100644 index 0000000..500e9c8 --- /dev/null +++ b/GenderCheck/test_calculate_gender.py @@ -0,0 +1,55 @@ +import calculate_gender + +import pytest + + +class TestIsValidRead(): + + class MyObject: + def __init__(self, qual, start, end): + self.mapping_quality = qual + self.reference_start = start + self.reference_end = end + + @pytest.mark.parametrize("read,mapping_qual,expected", [ + (MyObject(19, True, True), 20, False), # mapping quality is below the threshold + (MyObject(20, True, True), 20, True), # mapping quality is equal to the threshold + (MyObject(20, True, True), 19, True), # mapping quality is higher than the threshold + (MyObject(20, False, True), 20, False), # reference_end is false + (MyObject(20, True, False), 20, False), # reference_start is false + ]) + def test_is_valid_read(self, read, mapping_qual, expected): + assert expected == calculate_gender.is_valid_read(read, mapping_qual) + + +class TestGetGenderFromBam(): + @pytest.mark.parametrize("bam,mapping_qual,locus_y,ratio_y,expected", [ + ("./test_bam.bam", 20, "Y:2649520-59034050", 0.02, "male"), # output male below + ("./test_bam.bam", 20, "Y:2649520-59034050", 0.22, "female"), # output female + ]) + def test_get_gender_from_bam(self, bam, mapping_qual, locus_y, ratio_y, expected): + assert expected == calculate_gender.get_gender_from_bam(bam, mapping_qual, locus_y, ratio_y) + + +class TestCompareGender(): + @pytest.mark.parametrize("sample_id,analysis_id,test_gender,true_gender,expected", [ + # test_gender and true_gender identical, should be PASS + ("test_sample", "test_analyse", "male", "male", "test_sample\ttest_analyse\tmale\tmale\tPASS\n"), + # test_gender and true_gender not identical , should be FAIL + ("test_sample", "test_analyse", "male", "female", "test_sample\ttest_analyse\tmale\tfemale\tFAIL\n"), + # true_gender unknown, should be PASS + ("test_sample", "test_analyse", "male", "unknown", "test_sample\ttest_analyse\tmale\tunknown\tPASS\n"), + # true_gender not_detected, should be FAIL + ("test_sample", "test_analyse", "male", "not_detected", "test_sample\ttest_analyse\tmale\tnot_detected\tFAIL\n"), + ]) + def test_compare_gender(self, sample_id, analysis_id, test_gender, true_gender, expected): + assert expected == calculate_gender.compare_gender(sample_id, analysis_id, test_gender, true_gender) + + +def test_write_qc_file(tmp_path): + path = tmp_path / "qc_folder" + path.mkdir() + qc_file = path / "test_sample_test_analyse_gendercheck.txt" + calculate_gender.write_qc_file("test_sample", "test_analyse", "test_sample\ttest_analyse\tmale\tmale\tPASS\n", path) + message = "sample_id\tanalysis_id\ttest_gender\ttrue_gender\tstatus\ntest_sample\ttest_analyse\tmale\tmale\tPASS\n" + assert message in qc_file.read_text() diff --git a/Kinship/Kinship.nf b/Kinship/Kinship.nf index 1da9eb7..9241dbf 100644 --- a/Kinship/Kinship.nf +++ b/Kinship/Kinship.nf @@ -17,6 +17,6 @@ process Kinship { plink --file out --make-bed --noweb king -b plink.bed --kinship cp king.kin0 ${analysis_id}.kinship - python ${baseDir}/CustomModules/Kinship/check_kinship.py ${analysis_id}.kinship ${ped_file} > ${analysis_id}.kinship_check.out + python ${projectDir}/CustomModules/Kinship/check_kinship.py ${analysis_id}.kinship ${ped_file} > ${analysis_id}.kinship_check.out """ } \ No newline at end of file diff --git a/MosaicHunter/1.0.0/Dockerfile b/MosaicHunter/1.0.0/Dockerfile new file mode 100644 index 0000000..8c5c75e --- /dev/null +++ b/MosaicHunter/1.0.0/Dockerfile @@ -0,0 +1,17 @@ +FROM --platform=linux/amd64 ubuntu:latest + +RUN apt-get update && \ + apt-get -y install openjdk-8-jdk-headless && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN apt-get update +RUN apt-get install -y git +RUN apt-get install -y git-lfs +RUN git lfs install +RUN apt-get install libcurl4 + +RUN apt-get install -y rsync +RUN rsync -aP hgdownload.soe.ucsc.edu::genome/admin/exe/linux.x86_64/blat/ ./../usr/bin + +RUN git clone https://github.com/zzhang526/MosaicHunter diff --git a/MosaicHunter/1.0.0/MosaicHunter.nf b/MosaicHunter/1.0.0/MosaicHunter.nf new file mode 100644 index 0000000..3f04dae --- /dev/null +++ b/MosaicHunter/1.0.0/MosaicHunter.nf @@ -0,0 +1,124 @@ +#!/usr/bin/env nextflow + +process MosaicHunterGetGender { + tag {"MosaicHunterGetGender ${sample_id}"} + label 'MosaicHunterGetGender' + container = 'ghcr.io/umcugenetics/custommodules_gendercheck:1.0.0' + shell = ['/bin/bash', '-eo', 'pipefail'] + + /* + Define inputs. + - Tuple consisting of a sample_id, a path to the .bam file, a path to the .bai file + */ + input: + tuple(val(sample_id), path(bam_files), path(bai_files)) + + /* + Define outputs. + - A tuple containing respectively the number for the alpha and beta found in the sample. + */ + output: + tuple(val(sample_id), path("gender_data_${sample_id}.tsv")) + + // The command to execute MosaicHunter Get Gender + script: + """ + python ${workflow.projectDir}/CustomModules/MosaicHunter/1.0.0/get_gender_from_bam_chrx.py \ + ${sample_id} \ + ${bam_files} \ + ./ \ + $params.mh_gender_ratio_x_threshold_male \ + $params.mh_gender_ratio_x_threshold_female \ + $params.mh_gender_mapping_qual \ + $params.mh_gender_locus_x + """ +} + +process MosaicHunterQualityCorrection { + // Step 1: Process input files + tag {"MosaicHunterQualityCorrection ${sample_id}"} + label 'MosaicHunterQualityCorrection' + container = 'docker://umcugenbioinf/mosaic_hunter:1.0.0' + shell = ['/bin/bash', '-euo', 'pipefail'] + + /* + Define inputs. + - Tuple consisting of a sample_id, a path to the .bam file, a path to the .bai file + - Path to the reference file + - Path to the MosaicHunter common site filter bed file + - Path to the MosaicHunter config file for the Quality Correction step + */ + input: + tuple(val(sample_id), path(bam_files), path(bai_files), path(gender_data)) + path(mh_reference_file) + path(mh_common_site_filter_bed_file) + path(mh_config_file_one) + + /* + Define outputs. + - A tuple containing respectively the number for the alpha and beta found in the sample. + */ + output: + tuple(val(sample_id), env(MHALPHA), env(MHBETA)) + + // The command to execute MosaicHunter + shell: + ''' + SEX_STRING=$(awk 'NR>1 {print $2}' gender_data_!{sample_id}.tsv) + + java -Xmx!{task.memory.toGiga()-4}G -jar /MosaicHunter/build/mosaichunter.jar \ + -C !{mh_config_file_one} \ + -P input_file=!{bam_files} \ + -P mosaic_filter.sex=$SEX_STRING \ + -P reference_file=!{mh_reference_file} \ + -P common_site_filter.bed_file=!{mh_common_site_filter_bed_file} \ + -P output_dir=./ + export MHALPHA="\$(grep -Po "(?<=alpha:\\s)\\w+" ./stdout*)" + export MHBETA="\$(grep -Po "(?<=beta:\\s)\\w+" ./stdout*)" + ''' +} + +process MosaicHunterMosaicVariantCalculation { + // Caclulate the Mosaic Variants + tag {"MosaicHunterMosaicVariantCalculation ${sample_id}"} + label 'MosaicHunterMosaicVariantCalculation' + container = 'docker://umcugenbioinf/mosaic_hunter:1.0.0' + shell = ['/bin/bash', '-euo', 'pipefail'] + + publishDir "QC/MosaicHunter", saveAs: { filename -> "${sample_id}_$filename" }, mode: 'copy' + + /* + Define inputs. + - Tuple consisting of a sample_id, a path to the .bam file, a path to the .bai file + - Path to the reference file + - Path to the MosaicHunter common site filter bed file + - Path to the MosaicHunter config file for the Mosaic Variant Calculation step + - The output of the MosaicHunterQualityCorrection step. This makes the environment variables available in this process + - A tuple containing respectively the number for the alpha and beta found in the + sample, which are stored in an environment variable. + */ + input: + tuple(val(sample_id), path(bam_files), path(bai_files), path(gender_data), env(MHALPHA), env(MHBETA)) + path(mh_reference_file) + path(mh_common_site_filter_bed_file) + path(mh_config_file_two) + + output: + path('final.passed.tsv') + + // The command to execute step two of MosaicHunter + // First get the SEX_STRING from the sample + shell: + ''' + SEX_STRING=$(awk 'NR>1 {print $2}' gender_data_!{sample_id}.tsv) + + java -Xmx!{task.memory.toGiga()-8}G -jar /MosaicHunter/build/mosaichunter.jar \ + -C !{mh_config_file_two} \ + -P mosaic_filter.alpha_param=$MHALPHA -P mosaic_filter.beta_param=$MHBETA \ + -P input_file=!{bam_files} \ + -P mosaic_filter.sex=$SEX_STRING \ + -P reference_file=!{mh_reference_file} \ + -P common_site_filter.bed_file=!{mh_common_site_filter_bed_file} \ + -P output_dir=./ + ''' +} diff --git a/MosaicHunter/1.0.0/get_gender_from_bam_chrx.py b/MosaicHunter/1.0.0/get_gender_from_bam_chrx.py new file mode 100644 index 0000000..ca5133c --- /dev/null +++ b/MosaicHunter/1.0.0/get_gender_from_bam_chrx.py @@ -0,0 +1,94 @@ +#! /usr/bin/env python3 +import argparse +import pysam + + +def is_valid_read(read, mapping_qual): + """Check if a read is properly mapped. + + Args: + read (): a pysam.AlignmentFile read + mapping_qual (int): the mapping quality + + Returns: + bool: True if the read is valid + """ + if (read.mapping_quality >= mapping_qual and read.reference_end and read.reference_start): + return True + return False + + +def get_gender_from_bam_chrx(bam_file_path, mapping_qual, locus_x, ratio_x_threshold_male, ratio_x_threshold_female): + """ + Calculates the gender based on a bam file and thresholds + + Args: + bam_file_path (str): the path to the bam file + mapping_qual (int): the mapping quality + locus_x (str): the locus of the chromosome + ratio_x_threshold_male (float): the ratio threshold for males + ratio_x_threshold_female (float): the ratio threshold for females + + Returns: + A tuple that consist of two elements: the gender as a single character and if the gender was forced + """ + with pysam.AlignmentFile(bam_file_path, "rb") as bam_file: + reads = float( + sum([is_valid_read(read, mapping_qual) for read in bam_file.fetch(region=locus_x)]) + ) + total_reads = float(bam_file.mapped) + ratio_perc = (reads / total_reads) * 100 + + # Check ratios + if ratio_perc <= ratio_x_threshold_male: + return "M", False + elif ratio_perc >= ratio_x_threshold_female: + return "F", False + else: + # Force Female if unknown + return "F", True + + +def write_genderdata_to_file(sample_id, gender_data, output_folder): + """ + Write the gender data to a tsv file + + Args: + sample_id (str): the id of the sample + gender_data (tuple): the gender and the forced value as a tuple + output_folder (str): the output folder + """ + with open(f"{output_folder}/gender_data_{sample_id}.tsv", "w") as csv_file: + gender, forced = gender_data + csv_file.write("sample_id\tgender\tforced\n") + csv_file.write(f"{sample_id}\t{gender}\t{forced}\n") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('sample_id', help='sample_id') + parser.add_argument('bam', help='path to bam file') + parser.add_argument('output_folder', help='path to output folder') + parser.add_argument( + "ratio_x_threshold_male", + type=float, + help="maximunum chromosome X ratio for males [float]" + ) + parser.add_argument( + "ratio_x_threshold_female", + type=float, + help="maximunum chromosome X ratio for females [float]" + ) + parser.add_argument('mapping_qual', type=int, help='minimum mapping quality of reads to be considered [int]') + parser.add_argument('locus_x', help='Coordinates for includes region on chromosome Y (chr:start-stop)') + args = parser.parse_args() + + gender_data = get_gender_from_bam_chrx( + args.bam, + args.mapping_qual, + args.locus_x, + args.ratio_x_threshold_male, + args.ratio_x_threshold_female, + ) + + write_genderdata_to_file(args.sample_id, gender_data, args.output_folder) diff --git a/MosaicHunter/1.0.0/requirements.txt b/MosaicHunter/1.0.0/requirements.txt new file mode 100644 index 0000000..7664a68 --- /dev/null +++ b/MosaicHunter/1.0.0/requirements.txt @@ -0,0 +1,5 @@ +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +pysam==0.22.0 +pytest==8.0.2 \ No newline at end of file diff --git a/MosaicHunter/1.0.0/test_bam.bam b/MosaicHunter/1.0.0/test_bam.bam new file mode 100644 index 0000000..e2ecb32 Binary files /dev/null and b/MosaicHunter/1.0.0/test_bam.bam differ diff --git a/MosaicHunter/1.0.0/test_bam.bam.bai b/MosaicHunter/1.0.0/test_bam.bam.bai new file mode 100644 index 0000000..ec3720d Binary files /dev/null and b/MosaicHunter/1.0.0/test_bam.bam.bai differ diff --git a/MosaicHunter/1.0.0/test_get_gender_from_bam_chrx.py b/MosaicHunter/1.0.0/test_get_gender_from_bam_chrx.py new file mode 100644 index 0000000..0a494ea --- /dev/null +++ b/MosaicHunter/1.0.0/test_get_gender_from_bam_chrx.py @@ -0,0 +1,46 @@ +import get_gender_from_bam_chrx +import pytest + + +class TestIsValidRead(): + class ValidReadObject: + def __init__(self, qual, start, end): + self.mapping_quality = qual + self.reference_start = start + self.reference_end = end + + @pytest.mark.parametrize("read,mapping_qual,expected", [ + (ValidReadObject(19, True, True), 20, False), # mapping quality is below the threshold + (ValidReadObject(20, True, True), 20, True), # mapping quality is equal to the threshold + (ValidReadObject(20, True, True), 19, True), # mapping quality is higher than the threshold + (ValidReadObject(20, False, True), 20, False), # reference_end is false + (ValidReadObject(20, True, False), 20, False), # reference_start is false + ]) + def test_is_valid_read(self, read, mapping_qual, expected): + assert expected == get_gender_from_bam_chrx.is_valid_read(read, mapping_qual) + + +class TestGetGenderFromBam: + @pytest.mark.parametrize("bam,mapping_qual,locus_x,ratio_x_threshold_male,ratio_x_threshold_female,expected_outcome", [ + ("./test_bam.bam", 20, "X:2699520-154931044", 3.5, 4.5, ("F", False)), + ("./test_bam.bam", 20, "X:2699520-154931044", 5.5, 7.5, ("M", False)), + ("./test_bam.bam", 20, "X:2699520-154931044", 4.5, 6.5, ("F", True)), + ]) + def test_get_gender_from_bam(self, bam, mapping_qual, locus_x, ratio_x_threshold_male, ratio_x_threshold_female, expected_outcome): + assert expected_outcome == get_gender_from_bam_chrx.get_gender_from_bam_chrx( + bam, mapping_qual, locus_x, ratio_x_threshold_male, ratio_x_threshold_female) + + +class TestWriteGenderDataToFile: + @pytest.mark.parametrize("sample_id,gender_data", [ + ("ThisIsASampleID1", ("M", False)), + ("ThisIsASampleID2", ("M", True)), + ("ThisIsASampleID3", ("F", False)), + ("ThisIsASampleID4", ("F", True)) + ]) + def test_write_gender_data_to_file(self, tmpdir, sample_id, gender_data): + print(tmpdir) + + get_gender_from_bam_chrx.write_genderdata_to_file(sample_id, gender_data, tmpdir) + file = tmpdir.join(f"/gender_data_{sample_id}.tsv") + assert f"{sample_id}\t{gender_data[0]}\t{gender_data[1]}\n" in file.read() diff --git a/Utils/CreateHSmetricsSummary.nf b/Utils/CreateHSmetricsSummary.nf index 8a8934f..2ca443f 100644 --- a/Utils/CreateHSmetricsSummary.nf +++ b/Utils/CreateHSmetricsSummary.nf @@ -12,6 +12,6 @@ process CreateHSmetricsSummary { script: """ - python2 ${baseDir}/CustomModules/Utils/create_hsmetrics_summary.py ${hsmetrics_files} > HSMetrics_summary.txt + python2 ${projectDir}/CustomModules/Utils/create_hsmetrics_summary.py ${hsmetrics_files} > HSMetrics_summary.txt """ } \ No newline at end of file diff --git a/Utils/GetStatsFromFlagstat.nf b/Utils/GetStatsFromFlagstat.nf index 4b89ba9..99018ed 100644 --- a/Utils/GetStatsFromFlagstat.nf +++ b/Utils/GetStatsFromFlagstat.nf @@ -12,6 +12,6 @@ process GetStatsFromFlagstat { script: """ - python2 ${baseDir}/CustomModules/Utils/get_stats_from_flagstat.py ${flagstat_files} > run_stats.txt + python2 ${projectDir}/CustomModules/Utils/get_stats_from_flagstat.py ${flagstat_files} > run_stats.txt """ } \ No newline at end of file diff --git a/Utils/ParseChildFromFullTrio.nf b/Utils/ParseChildFromFullTrio.nf index c185319..9963277 100644 --- a/Utils/ParseChildFromFullTrio.nf +++ b/Utils/ParseChildFromFullTrio.nf @@ -15,6 +15,6 @@ process ParseChildFromFullTrio { script: def sample_ids = sample_id.join(" ") """ - python2 ${baseDir}/CustomModules/Utils/parse_child_from_fulltrio.py ${ped_file} ${sample_ids} | tr -d '\n' + python2 ${projectDir}/CustomModules/Utils/parse_child_from_fulltrio.py ${ped_file} ${sample_ids} | tr -d '\n' """ } \ No newline at end of file