In: Computer Science
A) Develop a function GC(seq) using MATLAB that takes in as input parameter a nucleotide sequence seq returns the computed (G+C) content for the inputted seq.
B) Develop a function GCSlidingWindow (seq, winsize, overlap) that takes three input parameters, a biological seq, a sliding window size winsize and the extent of overlap between successive sliding windows { overlap. It calls the function GC and plots the G+C property measured along the span of the argument seq.
Sliding Window Algorithm
Given a larger integer buffer/array (say size, x), window size (say, n) and a number (say, k). Windows starts from the first element and by one element keeps shifting right. The objective is to find the minimum k numbers present in each window. Sliding window problem or algorithm is commonly.
This problem regularly features in programming interview questions. Basic concept is very simple, but some more variables thrown into question, that makes it more interesting.