Skip to content

Instantly share code, notes, and snippets.

View danilotat's full-sized avatar

Danilo Tatoni danilotat

  • Siena
  • 13:39 (UTC +02:00)
View GitHub Profile
import cyvcf2
import pandas as pd
import subprocess
import os
import time
import glob
import argparse
import re
import numpy as np
import shutil
@danilotat
danilotat / boxplot_three_groups_stat.py
Created December 4, 2023 14:39
Plot a boxplot comparing a quantitative (dependent) variable in three groups (defined by the independent variable) applying most common statistical tests. Pvalues or stars like in PRISM.
from decimal import Decimal
from scipy import stats
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import itertools
def plotBoxplotWithTest3Groups(df: pd.DataFrame, depVar: str, indVar: str, ax: plt.Axes, test: str, prop=None, explicitP=False) -> plt.Axes:
"""
@danilotat
danilotat / query_ensembl.py
Last active February 26, 2024 15:26
Fully remote, it downloads GTF annotation file from Ensembl FTP repo for the provided organism and version, than return .tsv file with gene_id and hgnc_symbol.
#!/usr/bin/python3
import sys
import os
import tempfile
import gzip
import argparse
from ftplib import FTP
@danilotat
danilotat / GeneCards_query.py
Created July 25, 2021 08:10
Query GeneCards to get Entrez ID, symbol from any Ensembl gene ID.
#!/usr/bin/python3
from bs4 import BeautifulSoup
import requests
import html
import time
import argparse
'''
Made in a boring day by @danilotat. Enjoy