Programming Language – Needleman-Wunsch – Smith-Waterman – Python Script Writing Assessment Answer

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

Python Script Writing Assessment Answer
Assignment Task:

PART I: Write-up (
+25pts
)

Turn in Part I on Blackboard (hand-written answers will be accepted, either scan your write-up or upload a photo of your answers)

What is the difference between the Needleman-Wunsch (NW) and Smith-Waterman (SM) algorithms? (+5pts)

Write the BWT with FM-Index for the following two sequences. Circle or box the index the read starts at as your final answer. The first listed will be considered the reference (T), the second will be considered the read (P). Provide all steps! Missing steps will get 0 points. (+20pts)

T
= AATTGCGCGG
P
= TTGC
PART II: Coding (+91pts)
Turn in Part II on Comet (I will check timestamps of your files to see when you last modified and this will be your ‘turn in’ time)
All scripting must be done in Python
All execution of external software must be located in a Shell script, Makefile, SnakeMake file, etc. (the same pipeline framework you used in Assignment 3)
Keep all answers for Part II on Comet (
/oasis/projects/nsf/sdu125/[
yourXSEDEUserName
]/assignment4/
)
Please include any and all code within separate script files for grading purposes
Use Comet for this assignment

Create a directory exactly called
assignment4
(
+5
)

Write a Python script that will perform the BWT of the above sequence (
T
). (
+15pts
)

Create your own two DNA sequences (of equal length), you will need these to test your code in the following questions. Place these two sequences in a single FASTA formatted file with sensible headers. Call this file
test-alignment.fasta
(
+5pts
)

Rite two Python scripts that will take as input a FASTA file that contains ONLY 2 sequences and (
+5pts
) (hint:
argparse
is a great way to create parameters/arguments for any Python script).

calculate the Hamming distance between two given sequences. (You do not need to print the alignment to the screen) Name your script hamming.py (+20pts)

calculate the alignment score of the same two sequences using the Needleman-Wunsch algorithm (must write the aligner code yourself, no packages/modules!). Name your script alignNW.py (+20pts)

Match = +1; Mismatch = -1; Gap = -2

DO NOT WRITE ANY FILES IN OUTPUT. PRINT YOUR ALIGNMENT AND ALIGNMENT SCORES TO THE SCREEN. Use pipes (|) to show where the two sequences align (see below for an example)

A T G C G
  | |   | |
A T G C T

Align your Illumina raw reads you downloaded in your previous assignment using a whole-genome aligner (e.g.
bwa
or
bowtie2
). Ensure your alignment is sorted (aligners do not sort the reads—consensus callers will throw an error if you do not sort your alignment) (use
samtools
). Store your file as a BAM. (
+10pts
)
Create an index of your BAM (
+5pts
)
Your alignment files must have your SRR accession as the prefix name (
+1pt
)
Add these commands (sort and index) to your framework script you wrote in Assignment 3 (copy the script to assignment4 and add your command) (
+5pts
)

BONUS (+30pts): Must be written in Python
Create a directory in assignment4 called bonus and place all scripts/files for these bonus questions in the bonus directory
Use the above T and P for the following questions but make your code accept any reference T and any prefix P (two separate arguments, T argument can be a file, P argument can be a string)
Write a Python script that will create a suffix array index and your first and last columns for a given T. For your suffix array index, write two files (if you plan on doing #2 and #3 below), one that contains all indices, another that contains only every even index. If you do not plan on doing #2 and #3, just include all indices. Write these two items to two files: reference.sa (reference-all.sa and reference-even.sa if doing #2 & #3) and reference.fl. Name your script bwIndex.py (+5pts).
Write a Python script that will identify the index in your reference T your read P is located using your suffix array and first/last columns. You will keep all indices for this problem. Print the location of the input P to the screen. Name your script bwAlignAllIndices.py (+10pts)
Write a similar Python script as #2 but only keep every even index from your suffix array and identify the index P is in your reference T with LF mapping and check pointing. Print the location of the input P to the screen. Name your script bwAlignEvenIndices.py (+10pts)
Write a Python script that will align two sequences using the Smith-Waterman algorithm. Print the alignment to the screen. Use pipes (|) to show where the two sequences align (see below for an example). Name your script alignSW.py (+5pts)

This Python Script Writing Assessment has been solved by our Programming language experts at TVAssignmentHelp. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services