Skip to content

Instantly share code, notes, and snippets.

View mr-eyes's full-sized avatar
🦆

Mohamed Abuelanin mr-eyes

🦆
View GitHub Profile
@mr-eyes
mr-eyes / README.md
Last active April 2, 2025 22:24
CHM13v2.0 Segmental Duplications

node_metadata.tsv

A table with one row per unique genomic region (node) involved in a structural duplication.

Column Description
id Unique ID for the genomic region (chr:start-end)
gene_name Ensembl or Liftoff-assigned gene name overlapping this region (if a
@mr-eyes
mr-eyes / code.gs
Last active May 17, 2025 19:59
Google Slides Agenda Tracking Bar Script
function addOrUpdateAgendaBarWithProgressV5() {
const pres = SlidesApp.getActivePresentation();
const slides = pres.getSlides();
// 0) Clear any existing timeline shapes on ALL slides
slides.forEach(slide => {
slide.getPageElements().forEach(el => {
const t = el.getTitle && el.getTitle();
if (t && t.startsWith('AGENDA_')) {
el.remove();
@mr-eyes
mr-eyes / environment.yml
Last active January 19, 2023 08:27
kSpider Demo
name: kspider
channels:
- conda-forge
- bioconda
dependencies:
- python=3.9
- pip
- sourmash
- pip:
- kSpider
@mr-eyes
mr-eyes / sourmash_ani.cpp
Created September 23, 2022 23:26
Call sourmash ani in C++
#include <Python.h>
#include <iostream>
using namespace std;
class toANI {
public:
PyObject* moduleMainString, * moduleMain, * func;
toANI() {
@mr-eyes
mr-eyes / prefetch_clustering.py
Created July 23, 2022 10:22
Clustering prefetch comparisons
import retworkx as rx
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--csv', type=str, required=True, help="pairwise csv file")
parser.add_argument('--cutoff', type=int, required=True,
help="clustering threshold (0:100)")
parser.add_argument('--mode', type=str, required=True, choices=['ani', 'cont'],
@mr-eyes
mr-eyes / nearest_genomes.py
Last active February 6, 2022 14:56
Using the new NCBI's datasets API to get the nearest available reference genomes for a given taxon or organism name.
"""
Using the new NCBI's datasets API to get the nearest available reference genomes for a given taxon or organism name.
Input: TAX_ID or Name
Output:
1- The nearest organism with available reference genomes
2- Accessions of the reference genomes
Requirements:
@mr-eyes
mr-eyes / annotations.txt
Last active April 20, 2021 16:23
kSpider 2 DBRetina test
parent metadata
p1 DB_A
p2 DB_B
p3 DB_C
p4 DB_A
p5 DB_A
p6 DB_A
p7 DB_B
p8 DB_C
p9 DB_C
@mr-eyes
mr-eyes / kProcessor_index_validator.py
Created March 27, 2021 10:34
kProcessor index validator
# Validate kProcessor 1 index
from itertools import groupby
import os
import kProcessor as kp
import hashlib
class IntegralHasher:
"""
Input: Unitigs Fasta file generated from BCALM.
Output: CSV File with the following format
A. Column(1): Connected Component ID
B. Column(2:): Unitigs ID(s)
Run:
python unitigs_to_connected_components.py <unitigs_path>
"""
@mr-eyes
mr-eyes / clusters.tsv
Last active October 6, 2020 02:28
Merge and process tables (special)
1 2 2 1 3
1 2 3 4 5