Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraluebbert committed May 24, 2024
1 parent a55f648 commit 96dfc3f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gget/gget_cosmic.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def cosmic(
## Create copy of results formatted for further use by gget mutate
if verbose:
logger.info(
"Creating modified database file for use with gget mutate..."
"Creating modified mutations file for use with gget mutate..."
)

if mutation_class == "cancer" or mutation_class == "cancer_example":
Expand All @@ -280,7 +280,7 @@ def cosmic(

# Get seq_ID and mutation columns
if mutation_class == "cancer" or mutation_class == "cancer_example":
df["MUTATION_ID"] = df["MUTATION_URL"].str.extract(r"id=(\d+)")
df["MUTATION_URL"] = df["MUTATION_URL"].str.extract(r"id=(\d+)")
df = df.rename(
columns={
"ACCESSION_NUMBER": "seq_ID",
Expand All @@ -306,6 +306,11 @@ def cosmic(
mutate_csv_out = mutation_tsv_file.replace(".tsv", "_gget_mutate.csv")
df.to_csv(mutate_csv_out, index=False)

if verbose:
logger.info(
f"Modified mutations file for use with gget mutate created at {mutate_csv_out}"
)

else:
# Check if 'entity' argument is valid
sps = [
Expand Down

0 comments on commit 96dfc3f

Please sign in to comment.