-
In R, implement a function
GreedySuperstring()
according to the pseudocode. -
Input:
S
ADNAStringSet
of strings (reads).
-
Output:
S
ADNAStringSet
of the shortest common superstring (contig).
Hint: Create also functions:
Overlap()
to calculate overlap between two sequences.OverlapMatrix()
to create a matrix of overlaps among all sequences inS
.
GreedySuperstring(S)
1 while length of S > 1
2 overlapMat <- OverlapMatrix(S)
3 if max(overlapMat) = 0
4 return S
5 else
6 seq1, seq2 ← Two sequences from S with the longest overlap
7 Merge seq1 and seq2 and add the new sequence to S
8 Remove seq1 and seq2 from S
9 return S
Download files from GitHub
Basic Git settings
- Configure the Git editor
git config --global core.editor notepad- Configure your name and email address
git config --global user.name "Zuzana Nova" git config --global user.email [email protected]- Check current settings
git config --global --list
-
Create a fork on your GitHub account. On the GitHub page of this repository find a Fork button in the upper right corner.
-
Clone forked repository from your GitHub page to your computer:
git clone <fork repository address>
- In a local repository, set new remote for a project repository:
git remote add upstream https://github.com/mpa-prg/exercise_09.git
Create a new commit and send new changes to your remote repository.
- Add file to a new commit.
git add <file_name>
- Create a new commit, enter commit message, save the file and close it.
git commit
- Send a new commit to your GitHub repository.
git push origin main