Commit 90638a8a authored by Pradat Yoann's avatar Pradat Yoann
Browse files

make tumor_id and normal_id optional

parent e1801ca7
......@@ -139,8 +139,6 @@ if __name__ == "__main__":
col_tumor = "PRIMARY"
else:
col_tumor = "METASTATIC"
normal_id = dt_identifiers["Matched_Norm_Sample_Barcode"]
tumor_id = dt_identifiers["Tumor_Sample_Barcode"]
infos_n_reads = ["AD", "DP", "FA"]
infos_other = ["SS", "GT"]
......@@ -149,8 +147,6 @@ if __name__ == "__main__":
vcf_file = vcf_file,
col_normal = col_normal,
col_tumor = col_tumor,
normal_id = normal_id,
tumor_id = tumor_id,
infos_n_reads = infos_n_reads,
infos_other = infos_other,
dt_folders = dt_folders,
......
......@@ -136,8 +136,6 @@ if __name__ == "__main__":
#### get parameter values
col_normal = dt_identifiers["Matched_Norm_Sample_Barcode"]
col_tumor = dt_identifiers["Tumor_Sample_Barcode"]
normal_id = dt_identifiers["Matched_Norm_Sample_Barcode"]
tumor_id = dt_identifiers["Tumor_Sample_Barcode"]
vcf_type = df_meta.loc[index_vcf_file, "vcf_type"]
......@@ -153,8 +151,6 @@ if __name__ == "__main__":
vcf_file = vcf_file,
col_normal = col_normal,
col_tumor = col_tumor,
normal_id = normal_id,
tumor_id = tumor_id,
infos_n_reads = infos_n_reads,
infos_other = infos_other,
dt_folders = dt_folders,
......
......@@ -70,9 +70,9 @@ class Vcf2mafConfig:
run: bool=True
overwrite: bool=False
def run_annotator(vcf_folder: str, vcf_file: str, col_normal: str, col_tumor: str, tumor_id: str, normal_id: str,
infos_n_reads: list, infos_other: list, dt_folders: dict, vcf2maf_config: Vcf2mafConfig,
vep_config: VepConfig, dt_identifiers: dict=None) -> None:
def run_annotator(vcf_folder: str, vcf_file: str, col_normal: str, col_tumor: str, infos_n_reads: list,
infos_other: list, dt_folders: dict, vcf2maf_config: Vcf2mafConfig, vep_config: VepConfig,
dt_identifiers: dict=None, tumor_id: str=None, normal_id: str=None) -> None:
"""
Run the manual, vcf2maf and/or vep annotations on one VCF file and assemble.
......@@ -103,10 +103,20 @@ def run_annotator(vcf_folder: str, vcf_file: str, col_normal: str, col_tumor: st
See VepConfig class.
dt_identifiers: dict, optional
dict with key, value pairs that will be added as single-value columns in the maf file
tumor_id: str, optional.
Tumor identifier if different from col_tumor (e.g if col_tumor = "PRIMARY").
normal_id: str, optional.
Normal identifier if different from col_normal (e.g if col_normal = "NORMAL").
"""
vcf_path = os.path.join(vcf_folder, vcf_file)
out_file = vcf_file.replace(".vcf", ".txt")
if tumor_id is None:
tumor_id = col_tumor
if normal_id is None:
normal_id = col_normal
#### # 1. RUN EACH ANNOTATOR
#### # ###################################################################################################
......
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