Skip to content

Instantly share code, notes, and snippets.

View ghuertaramos's full-sized avatar

Guillermo Huerta Ramos ghuertaramos

View GitHub Profile
@nedaresa
nedaresa / get_dominant_color.py
Created January 9, 2020 06:44
This function detects dominant color from an image
### Neda Jabbari
### Jan 8, 2020
### The get_dominant_color function detects dominant color from an image using a dictionary of basic colors,
### k-means clustering and eucledian distance.
def get_dominant_color(image, k, image_processing_size):
"""
Read and prepare image in RGB color space.
Perform kmeans clustering to get color clusters.
@ghuertaramos
ghuertaramos / getAAsecs.sh
Last active February 28, 2017 02:44
Script to count aminoacids from a protein sequence
#! /bin/bash
##Este script cuenta el número de aminoácidos que contiene una serie de proteínas definidas por el usuario
##This script counts aminoacids from a series of proteins defined by the user
#Requiere de un archivo de entrada "input.txt" que contenga las claves NCBI separados por espacios (p.ej. AAA84121.1 BAA83246.1)
#It requires an input file "input.txt" containing NCBI keys saparated by spaces for the desired proteins (e.g. AAA84121.1 BAA83246.1)
#Genera un directorio de trabajo
#Generates a working directory
mkdir Amino
#Baja las secuencias en formato fasta y genera archivos intermedios que contienen sólo la secuencia de aminoácidos
#Downloads sequences in fasta format then it generates intermediate files containing only aminoacid sequences