Highlights
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).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 My Uni Paper. 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.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.