-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new file: cre.annotate_str.toml new file: protein_coding_genes.bed.gz new file: protein_coding_genes.bed.gz.tbi
- Loading branch information
1 parent
caffd79
commit 37106fc
Showing
4 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
#use cre.annotate_str.sh vcf_from_lobstr.vcf | ||
|
||
bname=`echo $1 | sed s/.vcf//` | ||
|
||
cat $1 | grep "^#" > $bname.sorted.vcf | ||
#sometimes lobSTR gives you unsorted vcf for some reason | ||
cat $1 | grep -v "^#" | sort -t $'\t' -k1,1 -k2,2n >> $bname.sorted.vcf | ||
|
||
bgzip $bname.sorted.vcf | ||
tabix $bname.sorted.vcf.gz | ||
|
||
#there may be no gene | ||
vcfanno -base-path ~/cre/ ~/cre/cre.annotate_str.toml $bname.sorted.vcf.gz > $bname.annotated.vcf | ||
rm $bname.insertions.txt | ||
echo -e "CHR\tPOS\tREF\tALT\tGENE\tGENOTYPE\tINSERTION_LENGTH_BP" > $bname.insertions.txt | ||
cat $bname.annotated.vcf | grep -v "^#" | sed s/"gene="/"\t"/g | grep "0/1:" | awk '{print $1"\t"$2"\t"$4"\t"$5"\t"$9"\t"$NF}' | sed s/":.*"// | \ | ||
awk '{if (length($3)<length($4)) print $0"\t"length($4)-length($3);}' | sort -k7,7 -rn >> $bname.insertions.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[[annotation]] | ||
file="protein_coding_genes.bed.gz" | ||
columns = [4] | ||
names=["gene"] | ||
ops=["self"] |
Binary file not shown.
Binary file not shown.