From 582508dbc5a44daa0498d643e6163413df072832 Mon Sep 17 00:00:00 2001 From: Arun Somwarpet-Seetharam - staff Date: Sun, 24 Feb 2019 19:38:48 -0600 Subject: [PATCH 1/2] script for creating ini file for i-AdHore, using just the gff files --- generate_i-AdHore_ini-file.sh | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 generate_i-AdHore_ini-file.sh diff --git a/generate_i-AdHore_ini-file.sh b/generate_i-AdHore_ini-file.sh new file mode 100755 index 0000000..7fbb981 --- /dev/null +++ b/generate_i-AdHore_ini-file.sh @@ -0,0 +1,47 @@ +#!/bin/bash +gff="$1" +base="$2" +#table="$3" +mkdir -p $base +awk '$3=="mRNA" {print $1"\t"$7"\t"$9}' $gff |\ + sed 's/;/\t/1' | sed 's/ID=//g' |\ + awk -v x="$base" '{print x"_"$1"\t"$3""$2}' |\ + sed 's/Sobic./'$base'_/g' > $base/${base}_full.lst +awk '$3=="mRNA" {print $9}' $gff |\ + sed -e 's/;/\t/1' -e 's/ID=//g' |\ + cut -f 1 |\ + awk '{print $1"\tfamily."$1}' |\ + sed -e 's/family.Sobic./OG_/g' -e 's/.mrna.\{1,3\}$//g' |\ + sed 's/^Sobic./'$base'_/1' >> blast_table.txt + +awk '{print>$1"_chr.list"}' ${base}/${base}_full.lst +#echo "blast_table=$(realpath ${base}_blast.pairs)" +echo "genome=${base}" +i=1 +for list in ${base}*_chr.list; do +cut -f 2 $list > $list.temp; +mv $list.temp $base/$list; +echo "CO$i ${base}/${list}" +rm $list +((i++)) +done +cat < Date: Mon, 25 Feb 2019 09:21:36 -0600 Subject: [PATCH 2/2] script for aligning cds to genome to get the gff3 file --- runGMAP.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 runGMAP.sh diff --git a/runGMAP.sh b/runGMAP.sh new file mode 100755 index 0000000..5f4e89e --- /dev/null +++ b/runGMAP.sh @@ -0,0 +1,14 @@ +#!/bin/bash +module load gmap-gsnap +db="$1" +fasta="$2" +threads=36 +out="${db%.*}_${fasta%.*}" +for type in match_est match_cdna gene; do +if [ ! -f "${out}_${type}.gff3.done" ]; then +gmap -D /work/LAS/mhufford-lab/arnstrm/NAM/genomes -d ${db} -B 4 -t $threads -f gff3_${type} ${fasta} > ${out}_${type}.gff3 2> ${out}_${type}.err +if [ $? -eq 0 ]; then + touch "${out}_${type}.gff3.done" +fi +fi +done