<jupyter_start><jupyter_text>Are there any othere experiments submitted?<jupyter_code>import os
import sys
import requests
import pandas
import paramiko
import json
from IPython import display
from pathlib import Path
import configparser
from curation_common import *
# live server & control file
server = ENCODED('www.encodeproject.org')
spreadsheet_name = Path('~/woldlab/ENCODE/altius-biosamples.xlsx').expanduser()
engine=None
#engine='odf'

# test server & datafile
#server = ENCODED('test.encodedcc.org')
#spreadsheet_name = os.path.expanduser('~diane/woldlab/ENCODE/C1-encode3-limb-2017-testserver.ods')

server.load_netrc()
award = 'UM1HG009443'<jupyter_output><empty_output><jupyter_text>Lookup biosample ontologies Lookup any biosample ontologies that are already present<jupyter_code>biosample = pandas.read_excel(spreadsheet_name, sheet_name='Biosample', header=0, engine=engine)

counts = []
for i, row in biosample.iterrows():
    if not pandas.isnull(row.accession) and row.accession.startswith('E'):
        graph = server.search_jsonld(searchTerm=row.accession)
        experiments = [(x['assay_term_name'], x['accession']) for x in graph['@graph'] if 'Experiment' in x['@type']]
        counts.append((row.accession, len(experiments), experiments))
        print(counts[-1])

        #biosample_ontology = obj['biosample_ontology']
        #if isinstance(biosample_ontology, dict):
        #    biosample.loc[i, 'biosample_ontology'] = biosample_ontology['@id']
        #    biosample.loc[i, 'biosample_term_name:skip'] = biosample_ontology['term_name']
        #biosample.loc[i, 'source'] = obj['source']['@id']
            
#biosample<jupyter_output>('ENCBS110XTZ', 0, [])
('ENCBS209QZR', 0, [])
('ENCBS561TMO', 0, [])
('ENCBS958KUJ', 0, [])
('ENCBS777ZHB', 0, [])
('ENCBS442IFD', 0, [])
('ENCBS716FWV', 0, [])
('ENCBS709WWH', 0, [])
('ENCBS376DPA', 0, [])
('ENCBS054TXJ', 0, [])
('ENCBS242ZYV', 0, [])
('ENCBS796XMS', 0, [])
('ENCBS071VBH', 0, [])
('ENCBS914VCE', 0, [])
('ENCBS663UJY', 0, [])
('ENCBS421OHT', 0, [])
('ENCBS159AUA', 0, [])
('ENCBS619MUG', 0, [])
('ENCBS346ZTC', 0, [])
('ENCBS955CKU', 0, [])
('ENCBS971MVA', 0, [])
('ENCBS242ELR', 0, [])
('ENCBS209WIA', 0, [])
('ENCBS228CJW', 0, [])
('ENCBS034RCQ', 0, [])
('ENCBS140YRJ', 0, [])
('ENCBS184IDE', 0, [])
('ENCBS363ZDB', 0, [])
('ENCBS563TLK', 0, [])
('ENCBS363EKC', 0, [])
('ENCBS266AID', 0, [])
('ENCBS279UZL', 0, [])
('ENCBS705PHY', 0, [])
('ENCBS094BGZ', 0, [])
('ENCBS770WQZ', 0, [])
('ENCBS203TGZ', 0, [])
('ENCBS578KCV', 0, [])
('ENCBS013RUL', 0, [])
('ENCBS264XMR', 0, [])
('ENCBS992QJM', 0, [])
('ENCBS010HTX', 0, [])
('ENCBS761GSR', 0, [])
('ENCBS263HBU', 0, [])
('ENCBS803L[...]
{'fraction_non_alphanumeric': 0.21046728971962617, 'fraction_numerical': 0.07102803738317758, 'mean_word_length': 5.791878172588833, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '477764', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1096, 'n_words': 193, 'path': 'encode-wold-altius-report.ipynb', 'repo_name': 'detrout/encode4-curation', 'size': '2675'}