Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elias_Issa-Project1 #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions candidates.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
proteome_03
proteome_42
proteome_45
proteome_50
37 changes: 37 additions & 0 deletions projectScript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#Compiles all the individual hsp70 and mcrA sequences into one file
cat ref_sequences/hsp70*.fasta > hsp70seq.fasta
cat ref_sequences/mcrA*.fasta > mcrAseq.fasta

Copy link
Owner

Choose a reason for hiding this comment

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

+2

#Uses combined seq files to form alignments using muscle
~/Private/Biocomputing2022/Tools/muscle -in hsp70seq.fasta -out hsp70align.afa
~/Private/Biocomputing2022/Tools/muscle -in mcrAseq.fasta -out mcrAalign.afa

Copy link
Owner

Choose a reason for hiding this comment

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

+3

#Uses alignments to build a profile with hmmbuild
~/Private/Biocomputing2022/Tools/hmmbuild hsp70profile.hmm hsp70align.afa
~/Private/Biocomputing2022/Tools/hmmbuild mcrAprofile.hmm mcrAalign.afa

Copy link
Owner

Choose a reason for hiding this comment

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

+3

#Sets headings for summary file and creates or overwrites summary csv file
echo proteome, hsp70_matches, mcrA_matches > summary.csv

#loops through all proteomes in proteomes file
for file in proteomes/*
do

#Represents the name of the current proteosome and modifies formatting
a=$(echo $file | sed 's/.fasta//' | sed -e 's/proteomes.//')

#Searches the hsp70 profile in current proteome and gets match number
b=$(~/Private/Biocomputing2022/Tools/hmmsearch hsp70profile.hmm $file | grep 'Domain search space' | cut -d ' ' -f 20)

#Searches for mcrA profile in current proteome and gets match number
c=$(~/Private/Biocomputing2022/Tools/hmmsearch mcrAprofile.hmm $file | grep 'Domain search space' | cut -d ' ' -f 20)

#Appends proteome name and hsp70 and mcrA matches to summary file
echo $a, $b, $c >> summary.csv
done

Copy link
Owner

Choose a reason for hiding this comment

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

+6

#Removes heading of summary file as well as proteomes with no matches
#Sorts by number of hsp70 matches (highest to lowest), gets top four matches (each with 3 hsp70) and saves proteome names to candidate file
cat summary.csv | sed '1d' | sed -e '/, 0/d'| sort -k2,2nr | head -n 4 | cut -d, -f 1 > candidates.txt

Copy link
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]