Requirements:
For this exercise you are to implement a small bioinformatics library for operations with DNA sequences, which, in this exercise, are represented as strings of only the characters A, C, G, and T. Three methods are required for this exercise and they are each detailed below.
Kmers
The term k-mer refers to all the possible substrings of length k that are contained in a DNA sequence. For example, given the DNA sequence AGATCGAGTG the 3-mers are:
AGA GAT ATC TCG CGA GAG AGT GTG
This method, Kmers, must take the following parameters in the order specified:
In the form of a string array, this method must return all the k-mers contained in the assembled sequence where is formed by concatenating all the provided DNA sequences in the order they are provided to the method.
ReverseComplement
The reverse complement of a sequence is formed by exchanging all of its nucleobases with their base complements, and then reversing the resulting sequence. The reverse complement of a DNA sequence is formed by exchanging all instances of:
and then reversing the resulting sequence.
For example, given the DNA sequence AAGCT the reverse complement is AGCTT
This method, ReverseComplement, must take the following parameter:
This method should return void and mutate the referenced DNA sequence to its reverse complement.
Dyad
A sequence exhibits dyad symmetry if the beginning of the sequence (the upstream sequence) is followed by the reverse complement of itself at the end of the sequence (the downstream sequence). For example, with n as a placeholder for any arbitrary DNA letter, the DNA sequence TTACGnnnnnnCGTAA exhibits dyad symmetry because the downstream sequence CGTAA is equal to the reverse complement of the upstream sequence TTACG. The substring between the complementary upstream and downstream sequences is referred to as the intervening sequence. It is not a requirement for the intervening sequence to have a length greater than zero for the whole sequence to exhibit dyad symmetry. In the above example, removing the intervening sequence would leave the sequence as TTACGCGTAA, which still exhibits dyad symmetry.
For this exercise, a DNA sequence only exhibits dyad symmetry if:
This method, Dyad, must take the following parameters:
This method must return a Boolean true if and only if the sequence exhibits dyad symmetry and false otherwise.
You should call ReverseComplement as part of your implementation.
Skeleton
Use the following skeleton as a basis for your program:
using System;
class Sequence
{
}
I have been struggling to find a way to implement these actions in C#. Any help would be much appeciated.
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp8
{
class Sequence
{
static void Main(string[] args)
{
var dict = new Dictionary<char, char>()
{
['A'] = 'T',
['T'] = 'A',
['G'] = 'C',
['C'] = 'G',
};
var input = "AAGCT";
var output = string.Concat(input.Select(c => dict[c]).Reverse()); // AGCTT
Console.WriteLine(input);
Console.WriteLine(output);
}
}
}
Requirements: For this exercise you are to implement a small bioinformatics library for operation...
Requirements: For this exercise you are to implement a small bioinformatics library for operations with DNA sequences, which, in this exercise, are represented as strings of only the characters A, C, G, and T. Three methods are required for this exercise and they are each detailed below. Kmers The term k-mer refers to all the possible substrings of length k that are contained in a DNA sequence. For example, given the DNA sequence AGATCGAGTG the 3-mers are: AGA GAT ATC...
I need to learn this in c# Requirements: For this exercise you are to implement a small bioinformatics library for operations with DNA sequences, which, in this exercise, are represented as strings of only the characters A, C, G, and T. Three methods are required for this exercise and they are each detailed below. Kmers The term k-mer refers to all the possible substrings of length k that are contained in a DNA sequence. For example, given the DNA sequence...
10. Write a one-page summary of the attached paper? INTRODUCTION Many problems can develop in activated sludge operation that adversely affect effluent quality with origins in the engineering, hydraulic and microbiological components of the process. The real "heart" of the activated sludge system is the development and maintenance of a mixed microbial culture (activated sludge) that treats wastewater and which can be managed. One definition of a wastewater treatment plant operator is a "bug farmer", one who controls the aeration...