<jupyter_start><jupyter_text>Database creation from gffs downloaded from pseudomonas.com<jupyter_code>from gffutils import create_db
ifile="/home/grotec/repos/SBW25DB/data/pseudomonas.com/Pseudomonas_fluorescens_SBW25_116.gff"

db = create_db(ifile,
                   ":memory:",
                   id_spec="ID",
                   force=True,
                   gtf_gene_key="gene_id",
                   gtf_transcript_key="transcript_id",
                   verbose=True,
                   checklines=0,
                   merge_strategy='error',
                   _keep_tempfiles=True,
                   )
db.conn()
db['gene1458068']
list(db.all_features())
import sqlite3
connection = sqlite3.connect("/home/grotec/repos/SBW25DB/sqlite/Pseudomonas_fluorescens_SBW25_116_annotations.sqlite.db")
cursor = connection.cursor()
cursor.execute("tables;")
cursor.fetchall()
cursor.execute("select name from sqlite_master where type='table';")
tables=cursor.fetchall()
tables
cursor.execute("select * from information_schema.columns where table_name = 'features';")
cursor.fetchall()[1]
%load_ext sql
%sql sqlite:////home/grotec/repos/SBW25DB/sqlite/Pseudomonas_fluorescens_SBW25_116_annotations.sqlite.db
%sql .headers on
%%sql
mode csv<jupyter_output>* sqlite:////home/grotec/repos/SBW25DB/sqlite/Pseudomonas_fluorescens_SBW25_116_annotations.sqlite.db
(sqlite3.OperationalError) near "mode": syntax error
[SQL: mode csv]
(Background on this error at: http://sqlalche.me/e/e3q8)
{'fraction_non_alphanumeric': 0.11546252532072923, 'fraction_numerical': 0.02835921674544227, 'mean_word_length': 3.518292682926829, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '354427', 'license': 'MIT', 'n_tokens_mistral': 538, 'n_tokens_neox': 474, 'n_words': 73, 'path': 'docs/source/include/notebooks/database creation.ipynb', 'repo_name': 'CFGrote/DBScraper', 'size': '1481'}