@@ -0,0 +1,988 @@
+from wikidataintegrator import wdi_core, wdi_login%0Afrom scheduled_bots.local import WDPASS, WDUSER%0A%0Alogin = wdi_login.WDLogin(WDUSER, WDPASS)%0Afrom tqdm import tqdm%0A%0Aquery = %22%22%22%0Aselect ?itemLabel ?item ?rf ?tax  where %7B%0A  ?item wdt:P2249 ?rf .%0A  ?item wdt:P685 ?tax .%0A  SERVICE wikibase:label %7B bd:serviceParam wikibase:language %22%5BAUTO_LANGUAGE%5D,en%22. %7D%0A%7D%22%22%22%0A%0Aquery = wdi_core.WDItemEngine.execute_sparql_query(query)%0Ad = %7Bx%5B'item'%5D%5B'value'%5D.split(%22/%22)%5B-1%5D: x%5B'rf'%5D%5B'value'%5D.split(%22/%22)%5B-1%5D for x in query%5B'results'%5D%5B'bindings'%5D%7D%0A%0Afor item_qid, refseq in tqdm(d.items()):%0A    write = False%0A    item = wdi_core.WDItemEngine(wd_item_id=item_qid)%0A    for s in item.statements:%0A        if s.get_value() == refseq:%0A            setattr(s, 'remove', '')%0A            write = True%0A    item.update(item.statements)%0A    if write:%0A        try:%0A            item.write(login, edit_summary=%22remove refseq genome id, moving to chromosome item%22)%0A        except Exception as e:%0A            print(item_qid, e)%0A

add remove_refseq_statements_from_organism.py