Skip to content

Commit

Permalink
Typo sequence_accesion -> sequence_accession
Browse files Browse the repository at this point in the history
  • Loading branch information
mberacochea committed Feb 16, 2024
1 parent e3e9cfb commit afa3f18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def process_to_index_and_update_records(self, analyses_to_index_and_update):
)
registry_id, metadata_match = self.mgx_api.check_analysis(
mgya=annotation_job.accession,
sequence_accession=annotation_job.run,
sequence_accession=sequence_accession,
metadata=metadata,
)
# The job is not registered
Expand Down
12 changes: 6 additions & 6 deletions emgapi/metagenomics_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def add_analysis(self, mgya: str, sequence_accession: str):
response = self.post_request(endpoint="datasets", data=data)
return response

def check_analysis(self, mgya: str, sequence_accesion: str, metadata=None):
def check_analysis(self, mgya: str, sequence_accession: str, metadata=None):
"""Check if a sequence exists in the M. Exchange
Parameters:
mgya : str
The MGnify Analysis accession.
sequence_accesion : str
sequence_accession : str
Either the Run accession or the Assembly accession related to the MGYA.
Returns:
Expand All @@ -124,16 +124,16 @@ def check_analysis(self, mgya: str, sequence_accesion: str, metadata=None):
"""
if not mgya:
raise ValueError(f"mgya is mandatory.")
if not sequence_accesion:
raise ValueError(f"sequence_accesion is mandatory.")
if not sequence_accession:
raise ValueError(f"sequence_accession is mandatory.")

logging.info(f"Checking {mgya} - {sequence_accesion}")
logging.info(f"Checking {mgya} - {sequence_accession}")

params = {
"broker": self.broker,
}

endpoint = f"sequences/{sequence_accesion}/datasets"
endpoint = f"sequences/{sequence_accession}/datasets"
analysis_registry_id = None
metadata_match = True

Expand Down

0 comments on commit afa3f18

Please sign in to comment.