Skip to content

Exercise 11 Problem Set#5

Open
whatzittoyah wants to merge 2 commits into
araiho:masterfrom
Larnold1997:master
Open

Exercise 11 Problem Set#5
whatzittoyah wants to merge 2 commits into
araiho:masterfrom
Larnold1997:master

Conversation

@whatzittoyah

Copy link
Copy Markdown

No description provided.

Logan and others added 2 commits November 10, 2017 22:38

@araiho araiho left a comment

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.

Good job working through this. You are almost there with problem 2. 3.9/4

../../../Bioinformatics/hmmer-3.1b2-macosx-intel/binaries/hmmbuild sporecoat.HMM sporecoat.align
../../../Bioinformatics/hmmer-3.1b2-macosx-intel/binaries/hmmbuild transporter.HMM transporter.align

for file in *.fasta

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.

This works. Could have also done something like:

for file in *.fasta
do
outSigma=$file.Sigma.hits
outSpore=$file.Spore.hits
outTrans=$file.Trans.hits
./hmmsearch --tblout $outSigma sigma.hmm $file
./hmmsearch --tblout $out sporecoat.hmm $file
./hmmsearch --tblout $out transporter.hmm $file
done

cat *.hits | grep -v "#" | awk '{print $1,$3,$5}' | sed -E 's/tr|[A-Z0-9]+|[A-Z0-9]+_9//g' > hmmOut.txt

Comment thread Problem2Attempt
}
#for loop to search for motifs and sort
for(i in data[,1]){
if(grepl("AKKPRVZE", data[i,1])){

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.

you want to use str_detect here

Comment thread Problem2Attempt
for(i in data[,1]){
if(grepl("AKKPRVZE", data[i,1])){

write(data[i,1], file = "motif1", append = TRUE)

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.

try writeLines instead of write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants