Skip to content

Instantly share code, notes, and snippets.

View fomightez's full-sized avatar

Wayne's Bioinformatics Code Portal fomightez

View GitHub Profile
@fomightez
fomightez / evaluate_date_timestamps_in_pipeline_stdout.py
Last active July 10, 2025 21:15
Evaluating date timestamp info in typical long and short read pipeline.
def collect_time_info(input_text_filepath):
'''
Take the entire row of columns and return that row of columns plus extra
columns with the details gleaned from timestamps in the the corresponding
`logs/???????_<accession>.out`
'''
with open(input_text_filepath, 'r') as thelog_stdout_file:
std_out_string=thelog_stdout_file.read()
# with std_out log read in, parse it for the informaiton in the three timestamps
start_ts = std_out_string.split('Current timestamp at start: ')[1].split('\n')[0].strip()
@fomightez
fomightez / Centered plots based on Discourse Post.ipynb
Created June 20, 2025 17:48
Centered MAtplotlib plots based on Discourse Post
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / Converting_Bytes_to_MBytes.ipynb
Created June 17, 2025 18:47
Converting Bytes to MBytes in the sense used by Sequence Read Archive tables and metadata and Logan Search Results. Allows inter-relating the various numbers given in exported data.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / README.md
Last active June 23, 2025 15:17
JupyterLab current on Binder with awscli and zstd
@fomightez
fomightez / demo_ipylab_using_documentsearch.ipynb
Created May 16, 2025 16:20
Demonstrate using documentsearch in a Jupyter Notebook via ipylab for programmatic text search, in reply to a Jupyter Discourse thread https://discourse.jupyter.org/t/targeted-documentsearch-command/34957?u=fomightez
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / mre_for_highlight_gene_names.py
Last active March 31, 2025 20:05
For SO https://stackoverflow.com/q/79546920/8508004 - MRE only. At this time the way the color is made doesn't transfer to Excel. You can color whole cell using `props` and then that would transfer
import pandas as pd
import numpy as np
import matplotlib as mpl
import re
df = pd.DataFrame({
"Gene_name": ["sdsR", "arrS","gadF"],
"Genes_in_same_transcription_unit": ['pphA, sdsR', 'arrS','mdtF, mdtE, gadF, gadE'],
})
# Convert Gene_name column to a set for quick lookup
@fomightez
fomightez / Plotting_Example_modern_Jupyter.ipynb
Created March 25, 2025 16:00
How to test plots in modern Jupyther without installing anything or signing up for an account
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / SO79494011-related.ipynb
Last active March 8, 2025 16:25
In reference to https://stackoverflow.com/a/79494011/8508004 which may be deleted as violating current policy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.