Skip to content

Instantly share code, notes, and snippets.

View apcamargo's full-sized avatar
🦖

Antônio Camargo apcamargo

🦖
View GitHub Profile
#!/usr/bin/env python
# Changes: python3, argparse, gff3
# check if python >= 3.6
import argparse
import sys
def main(input_file, output_file):
"""Converts a file from the BED (Browser Extensible Data) format to the GFF3 (General Feature Format version 3) format."""
@apcamargo
apcamargo / bootstraps_mann_whitney.R
Last active July 11, 2018 02:23
Calculate the Mann-Whitney test statistic in bootstrap samples using Hodges-Lehmann shift estimator
bootstraps_mann_whitney <- function(bootstraps_number, sample_1, sample_2) {
differences <- numeric()
for (i in sample_1) {
for (j in sample_2) {
differences[1 + length(differences)] <- i - j
}
}
bootstraps_statistic <- numeric(bootstraps_number)
hodges_lehmann_estimator <- median(differences)
sample_1_delta <- sample_1 - hodges_lehmann_estimator