Commit 8a954591 authored by peguerin's avatar peguerin
Browse files

from a table select only nonsynonymous variants

parent 17cd06f2
anvage synonymous --vcf diplodus_CDS.vcf \
--genome genomes/diplodus_genome_lgt6000.fasta \
--annotation annotation/sar_annotation.gff3 \
--output_prefix diplodus_CDS
vcftools --positions <(awk '{print $1" "$2}' diplodus_CDS_uniprot_blast_filtered.tsv | sort | uniq) --vcf diplodus_CDS_nonsynonymous.vcf --recode --out diplodus_CDS_uniprot_nonsynonymous
grep -v "^#" diplodus_CDS_uniprot_nonsynonymous.recode.vcf | awk '{ print $1"\t"$2}' | while read CHROMPOS; do grep "$CHROMPOS" diplodus_CDS_uniprot_blastx.tsv; done > diplodus_CDS_uniprot_nonsynonymous.tsv
nonsynonymous_chrompos () {
#1 vcf input
#2 genome fasta
#3 genome gff3
#4 prefix
#5 uniprot table
anvage synonymous --vcf $1 \
--genome $2 \
--annotation $3 \
--output_prefix $4
vcftools --positions <(awk '{print $1" "$2}' $5 | sort | uniq) --vcf $4"_nonsynonymous.vcf" --recode --out $4"_uniprot_nonsynonymous"
grep -v "^#" $4"_uniprot_nonsynonymous.recode.vcf" | awk '{ print $1"\t"$2}' | while read CHROMPOS; do grep "$CHROMPOS" $5; done > $4"_uniprot_nonsynonymous.tsv"
}
nonsynonymous_chrompos("mullus_CDS.vcf", "genomes/mullus_genome_lgt6000.fasta","annotation/mullus_annotation.gff3", "mullus_CDS","mullus_CDS_uniprot_blast_filtered.tsv")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment