Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _load_snps_helper(
self,
file,
discrepant_snp_positions_threshold,
discrepant_genotypes_threshold,
save_output,
):
logger.info("Loading {}".format(os.path.relpath(file)))
discrepant_positions, discrepant_genotypes = self._add_snps(
SNPs(file),
discrepant_snp_positions_threshold,
discrepant_genotypes_threshold,
save_output,
)
self._discrepant_positions = self._discrepant_positions.append(
discrepant_positions, sort=True
)
self._discrepant_genotypes = self._discrepant_genotypes.append(
discrepant_genotypes, sort=True
)
"""
import logging
import os
import numpy as np
import pandas as pd
from snps.snps import SNPs
from snps.utils import save_df_as_csv, clean_str
logger = logging.getLogger(__name__)
class SNPsCollection(SNPs):
def __init__(self, raw_data=None, output_dir="output", name="", **kwargs):
""" Object used to merge genotype / raw data files.
Parameters
----------
raw_data : list or str
path(s) to file(s) with raw genotype data
output_dir : str
path to output directory
name : str
name for this ``SNPsCollection``
"""
super().__init__(file="", output_dir=output_dir, **kwargs)
self._source = []
self._discrepant_positions_file_count = 0