Created
March 17, 2017 09:21
-
-
Save Endika/7c3a498b036c5a9531e2373e2d8ce8bb to your computer and use it in GitHub Desktop.
Simple alias to search in UCSC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Include in your ~/.bash_aliases | |
function search_genome(){ | |
mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A hg38 --execute="select kg.chrom, kg.strand, kg.txStart, kg.txEnd, kg.exonCount, kg.proteinID, kgp.seq from knownGene as kg inner join knownGenePep as kgp on kg.name=kgp.name where chrom=\"$1\" and txStart>=$2 limit $3;" | |
} | |
alias genomeSearch=search_genome | |
# How to run | |
# genomeSearch <Chromosome> <Position start> <result limit> | |
# genomeSearch chr21 5079293 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment