Created
February 13, 2020 20:08
-
-
Save brianjmpark/43f3a77b5ab0a7844e10fcfdc5a0c7e1 to your computer and use it in GitHub Desktop.
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
##takes output from bedtools intersect output tab delimted file containing all instances at which two annotations intersect | |
##bedtools intersect input of alignment.bed file and gff/gtf3 annotation | |
##script output count table of unique gene ID and number of intersect counts (collapsed under one gene id) | |
function count_intersect() { | |
echo "using file name $1.tsv" | |
cut -f15 $1_intersect_final.tsv | | |
tail -n +2 | | |
awk -F '[;]' '{print $2}' | | |
awk -F '["]' '{print $2}' | | |
sed 's.\\..g' | | |
sort -n | | |
uniq -c > $1_bedtools_count_new.txt | |
echo "done" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment