# Path: metatlas/io/update_lcmsfiles_in_lims.py
# EXTENSIONS = {'mzml':'.mzML',
#         'hdf5':'.h5',
#         'spectralhits':'_spectral-hits.tab.gz',
#         'pactolus':'.pactolus.gz',
#         'raw':'.raw'}


import numpy as np
import sys
import json
import pandas as pd
import re
import glob as glob
import os
import six
import time
import sys
import os
import pathlib
import argparse
import hashlib
import requests
import json
import pandas as pd
import numpy as np
import re
import time
import math
import collections
import xmltodict
import zipfile
    import gspread
    import subprocess
import numpy as np
import scipy.sparse as sp
    import subprocess
    import os.path
from collections import defaultdict
from xml.etree import cElementTree as ET
from io import StringIO
from metatlas.io.update_lcmsfiles_in_lims import EXTENSIONS
from collections import Mapping
from pathlib2 import PurePath
from subprocess import call
from labkey.api_wrapper import APIWrapper
from datetime import datetime, time as dtime
from subprocess import check_output
from ast import literal_eval
from copy import deepcopy
    from oauth2client.service_account import ServiceAccountCredentials
from pyteomics import mgf
#from metatlas.plots import dill2plots as dp


# imports for the xml to dictionary round trip


BATCH_FILE_PATH = '/global/common/software/m2650/mzmine_parameters/batch_files/'
BINARY_PATH = '/global/common/software/m2650/mzmine_parameters/MZmine'


# new stuff:


# you need this!
# https://github.com/LabKey/labkey-api-python
#
# sys.path.insert(0,'/Users/bpb/repos/labkey-api-python/')
# sys.path.insert(0,'/global/homes/b/bpb/repos/labkey-api-python/')
# import labkey as lk
# import hashlib
# sys.path.insert(0,'/global/homes/b/bpb/repos/metatlas')
# from metatlas.untargeted import mzmine_batch_tools_adap as mzm
#from metatlas.plots import dill2plots as dp




def get_google_sheet(notebook_name = "Sheet name",
                     token='/project/projectdirs/metatlas/projects/google_sheets_auth/ipython to sheets demo-9140f8697062.json',
                     sheet_name = 'Sheet1',

# Path: metatlas/io/update_lcmsfiles_in_lims.py
# EXTENSIONS = {'mzml':'.mzML',
#         'hdf5':'.h5',
#         'spectralhits':'_spectral-hits.tab.gz',
#         'pactolus':'.pactolus.gz',
#         'raw':'.raw'}


# Path: metatlas/untargeted/tools.py
import numpy as np
import sys
import json
import pandas as pd
import re
import glob as glob
import os
import six
import time
import sys
import os
import pathlib
import argparse
import hashlib
import requests
import json
import pandas as pd
import numpy as np
import re
import time
import math
import collections
import xmltodict
import zipfile
    import gspread
    import subprocess
import numpy as np
import scipy.sparse as sp
    import subprocess
    import os.path
from collections import defaultdict
from xml.etree import cElementTree as ET
from io import StringIO
from metatlas.io.update_lcmsfiles_in_lims import EXTENSIONS
from collections import Mapping
from pathlib2 import PurePath
from subprocess import call
from labkey.api_wrapper import APIWrapper
from datetime import datetime, time as dtime
from subprocess import check_output
from ast import literal_eval
from copy import deepcopy
    from oauth2client.service_account import ServiceAccountCredentials
from pyteomics import mgf

#from metatlas.plots import dill2plots as dp


# imports for the xml to dictionary round trip


BATCH_FILE_PATH = '/global/common/software/m2650/mzmine_parameters/batch_files/'
BINARY_PATH = '/global/common/software/m2650/mzmine_parameters/MZmine'


# new stuff:


# you need this!
# https://github.com/LabKey/labkey-api-python
#
# sys.path.insert(0,'/Users/bpb/repos/labkey-api-python/')
# sys.path.insert(0,'/global/homes/b/bpb/repos/labkey-api-python/')
# import labkey as lk
# import hashlib
# sys.path.insert(0,'/global/homes/b/bpb/repos/metatlas')
# from metatlas.untargeted import mzmine_batch_tools_adap as mzm
#from metatlas.plots import dill2plots as dp




def get_google_sheet(notebook_name = "Sheet name",
                     token='/project/projectdirs/metatlas/projects/google_sheets_auth/ipython to sheets demo-9140f8697062.json',
                     sheet_name = 'Sheet1',

                    literal_cols=None):