diff --git a/bashproject.sh b/bashproject.sh new file mode 100644 index 0000000..726e12e --- /dev/null +++ b/bashproject.sh @@ -0,0 +1,47 @@ +#This script can align reference proteome files that contain two specific genes within an entire proteome sequence +#This script is a model for alignment and can search for matches +#Matches will determine whether or not the proteomes carry both specific gene sets + +#usage: bash bashproject.sh + +#make a hsp70ref file and mcrAref file each containting all the reference sequences +cat ref_sequences/hsp70gene_*.fasta > hsp70ref +cat ref_sequences/mcrAgene_*.fasta > mcrAref + +#align all the reference sequences for the two genes +../tools/muscle -in hsp70ref -out hsp70musclealign +../tools/muscle -in mcrAref -out mcrAmusclealign + +#generate two HMM profiles for hsp70 and mcrA genes +../tools/hmmbuild --amino hsp70HMMbuild hsp70musclealign +../tools/hmmbuild --amino mcrAHMMbuild mcrAmusclealign + +#search each proteome for matches +cd proteomes +for file in *.fasta +do +../../tools/hmmsearch --tblout hsp70_$file ../hsp70HMMbuild $file +../../tools/hmmsearch --tblout mcrA_$file ../mcrAHMMbuild $file +done + +#search each result file +#print each proteome name and matches for each gene + +echo "proteome_number, hsp70_matches, mcrA_matches" > ../matches.txt + +for file in proteome_*.fasta +do +hsp70_match=$(cat hsp70_$file | grep -v '#' | wc -l) +mcrA_match=$(cat mcrA_$file | grep -v '#' | wc -l) +echo "$file, $hsp70_match, $mcrA_match" | sed 's/.fasta//g' >> ../matches.txt +done + +cd .. + +#when choosing best candidates, we elimated proteomes that did not have matches for either hsp70 or mcrA +#then the rankings of best candidates were determined by sorting the highest matches of hsp70 +#we determined that one mcrA was sufficient for a candidate and that more hsp70 matches was a more desirable candidate + +echo "Best candidate proteomes listed and sorted by greatest number of matches" > candidate_results.txt +cat matches.txt | grep -v "proteome_number" | grep -v " 0" | sort -k 2nr | cut -d , -f 1 >> candidate_results.txt + diff --git a/candidate_results.txt b/candidate_results.txt new file mode 100644 index 0000000..3612d97 --- /dev/null +++ b/candidate_results.txt @@ -0,0 +1,16 @@ +Best candidate proteomes listed and sorted by greatest number of matches +proteome_03 +proteome_42 +proteome_45 +proteome_50 +proteome_05 +proteome_07 +proteome_23 +proteome_24 +proteome_15 +proteome_16 +proteome_19 +proteome_38 +proteome_39 +proteome_44 +proteome_48 diff --git a/matches.txt b/matches.txt new file mode 100644 index 0000000..a5dae1a --- /dev/null +++ b/matches.txt @@ -0,0 +1,51 @@ +proteome_number, hsp70_matches, mcrA_matches +proteome_01, 4, 0 +proteome_02, 2, 0 +proteome_03, 3, 1 +proteome_04, 4, 0 +proteome_05, 2, 1 +proteome_06, 0, 0 +proteome_07, 2, 1 +proteome_08, 5, 0 +proteome_09, 1, 0 +proteome_10, 3, 0 +proteome_11, 6, 0 +proteome_12, 6, 0 +proteome_13, 3, 0 +proteome_14, 2, 0 +proteome_15, 1, 1 +proteome_16, 1, 1 +proteome_17, 4, 0 +proteome_18, 8, 0 +proteome_19, 1, 2 +proteome_20, 3, 0 +proteome_21, 5, 0 +proteome_22, 9, 0 +proteome_23, 2, 2 +proteome_24, 2, 1 +proteome_25, 5, 0 +proteome_26, 1, 0 +proteome_27, 1, 0 +proteome_28, 1, 0 +proteome_29, 0, 1 +proteome_30, 1, 0 +proteome_31, 7, 0 +proteome_32, 4, 0 +proteome_33, 0, 0 +proteome_34, 2, 0 +proteome_35, 1, 0 +proteome_36, 3, 0 +proteome_37, 1, 0 +proteome_38, 1, 1 +proteome_39, 1, 1 +proteome_40, 2, 0 +proteome_41, 1, 0 +proteome_42, 3, 1 +proteome_43, 3, 0 +proteome_44, 1, 1 +proteome_45, 3, 1 +proteome_46, 2, 0 +proteome_47, 1, 0 +proteome_48, 1, 1 +proteome_49, 3, 0 +proteome_50, 3, 1