Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions bashproject.sh
Original file line number Diff line number Diff line change
@@ -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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+2

#align all the reference sequences for the two genes
../tools/muscle -in hsp70ref -out hsp70musclealign
../tools/muscle -in mcrAref -out mcrAmusclealign

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+3

#generate two HMM profiles for hsp70 and mcrA genes
../tools/hmmbuild --amino hsp70HMMbuild hsp70musclealign
../tools/hmmbuild --amino mcrAHMMbuild mcrAmusclealign

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+3

#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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+2

#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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+4

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-header comments, including usage line [1 point]
-general commenting of code throughout script [1 point]
-code efficiency [2 points]

16 changes: 16 additions & 0 deletions candidate_results.txt
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions matches.txt
Original file line number Diff line number Diff line change
@@ -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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 3, 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