Skip to content

Commit

Permalink
update:
Browse files Browse the repository at this point in the history
  • Loading branch information
Dainius Kirsnauskas committed May 28, 2024
1 parent 8a5d301 commit 9602f5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data_collection/refactoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas as pd
from pandas import DataFrame

from .constants import LOVD_TABLES_DATA_TYPES
from .constants import LOVD_TABLES_DATA_TYPES, LOVD_PATH

def set_lovd_dtypes(df_dict):
"""
Expand Down Expand Up @@ -37,7 +37,7 @@ def set_lovd_dtypes(df_dict):
f"{LOVD_TABLES_DATA_TYPES[table_name][column]}")


def parse_lovd(path):
def parse_lovd(path=LOVD_PATH + '/lovd_data.txt'):
"""
Converts data from text file with LOVD format to dictionary of tables.
Expand Down Expand Up @@ -127,13 +127,13 @@ def from_clinvar_name_to_cdna_position(name):
return name[start:end]


def save_lovd_as_vcf(df, save_to):
def save_lovd_as_vcf(data, save_to="./lovd.vcf"):
"""
Gets hg38 variants from LOVD and saves as VCF file.
:param DataFrame df: LOVD DataFrame with data
:param DataFrame data: LOVD DataFrame with data
:param str save_to: path where to save VCF file.
"""

df = data["Variants_On_Genome"]
if "VariantOnGenome/DNA/hg38" not in df.columns:
raise ValueError("VariantOnGenome/DNA/hg38 is not in the LOVD DataFrame.")

Expand Down

0 comments on commit 9602f5a

Please sign in to comment.