INNER CODE UNIT · Python

preprocess_multiple_files

PharmGKB/PharmCAT · preprocessor/pcat/preprocess.py:90

def preprocess_multiple_files(pharmcat_positions_vcf: Path, reference_genome: Path,
                              regions_to_retain, custom_regions: bool,
                              vcf_files: list[Path], samples: list[str],
                              output_dir: Path, output_basename: str = '',
                              keep_intermediate_files: bool = False,
                              absent_to_ref: bool = False, unspecified_to_ref: bool = False,
                              concurrent_mode: bool = False, max_processes: int = 1, verbose: int = 0) -> list[Path]:
    """
    Normalize and prepare the input VCF for PharmCAT.
    """
    if len(vcf_files) == 0:
        return []

    results: list[Path] = []
    for file in vcf_files:
        # make sure we have samples
        file_samples: list[str] = []
        if samples is None or len(samples) == 0:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…