Skip to content

Commit

Permalink
msrun removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Sep 26, 2024
1 parent 795351e commit 3780cfc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 71 deletions.
Empty file removed msrun/__init__.py
Empty file.
44 changes: 0 additions & 44 deletions msrun/msrun.py

This file was deleted.

28 changes: 1 addition & 27 deletions pridepy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
import os
import click
import requests

from authentication.authentication import Authentication
from files.files import Files
from msrun.msrun import MsRun

from project.project import Project
from util.file_handling import FileHanding


@click.group()
Expand Down Expand Up @@ -107,29 +104,6 @@ def download_files_by_name(
raw_files.copy_file_from_dir_by_name(accession, file_name, input_folder)


@main.command()
@click.option("-f", "--filename", required=True, help="Metadata file")
@click.option("-u", "--username", required=True, help="PRIDE account username")
@click.option("-p", "--password", required=True, help="PRIDE account password")
def update_metadata(filename, username, password):
"""
Update extracted metadata from raw files into MongoDB
:return:
"""

# Get user token to make calls with PRIDE API
authentication = Authentication()
token = authentication.get_token(username, password)

# Format extracted metadata to compatible with PRIDE API endpoint
file_handling = FileHanding()
file_handling.wrap_with_ms_run_metadata(filename)

# Update msrun metatdata
msrun = MsRun()
msrun.update_msrun_metadata(filename, token)


@main.command()
@click.option(
"-k",
Expand Down

0 comments on commit 3780cfc

Please sign in to comment.