Skip to content

Vendrely_Davis_Exe11#1

Open
davissage wants to merge 6 commits into
araiho:masterfrom
davissage:master
Open

Vendrely_Davis_Exe11#1
davissage wants to merge 6 commits into
araiho:masterfrom
davissage:master

Conversation

@davissage

Copy link
Copy Markdown

No description provided.

@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.

Great job commenting things out and documenting the whole process. This submission was a little confusing because the answer for 1 is in a txt file and includes instructions not related to answering the question. But, it's still good to see the git hub workflow you use. 3.9/4

Comment thread Exe11_Q2.R
other[a] <- fasta[list4-1]
other[b] <- fasta[list4]
}
write.table(other, "Exercise11_files/Problem2/other.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.

Unique approach! Could also use:

library(stringr)

inFile=scan("motifsort.fasta",sep="\n",what=character())

motif1=file("motif1.fasta",open="w")
motif2=file("motif2.fasta",open="w")
other=file("nomotif.fasta",open="w")

for(i in 1:length(inFile)){
if(str_detect(inFile[i],">")){
seqID=inFile[i]
}else{
if(str_detect(inFile[i],"AKKPRVZE")){
writeLines(seqID,motif1)
writeLines(inFile[i],motif1)
}else if(str_detect(inFile[i],"AAQWWRNYGG")){
writeLines(seqID,motif2)
writeLines(inFile[i],motif2)
}else{
writeLines(seqID,other)
writeLines(inFile[i],other)
}
}
}

close(motif1)
close(motif2)
close(other)

Comment thread Tutorial11.txt
@@ -0,0 +1,61 @@
#Question 1_Tutorial 11

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're going to want some of this in a .sh file, so you can use it as an executable

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.

2 participants