Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DNA sequences are often stored in a text file having a specific format called FASTA file. FASTA format is a text-based format for representing either

DNA sequences are often stored in a text file having a specific format called FASTA file. FASTA format is a text-based format for representing either nucleotide or amino acid sequences. The format allows for sequence names and comments to precede each sequence. Figure 2 shows a simple example of a fasta file.

>First sequence ACACAGGAA

>Second sequence

ACGTCAGGTC

sequence

TACTGACEC

Figure 2: Example of a FASTA file

Your program should be able to read all sequences from a FASTA file and compute the k-mer usage bias from all sequences in the file.

3 Requirements

In this phase, you are required to implement the following classes:

// This class represents a set of sequences. public class SequenceSet { // Constructor.

public SequenceSet ( ) ;

// Load sequences from FASTA file.

public static SequenceSet load (String fileName) ;

// Return the global usage over al L sequences in the set. The word Length is k and window step size is w. public Usage getUsage (int k, int w) ;

// Return al L sequences in the set in the same order they appear in the file. public LinkedList getSequences ( ) ;

// This class represents a single sequence. public class Sequence { // Constructor.

public Sequence (String header, String seq) ; // Return the header of the sequence. public String getHeader() ; public String getSeq() ;

// Return the usage for word Length k and window step size w. public Usage getUsage (int k, int w) ;

// This class represents usage data at the sequence or sequence set Level. public class Usage { // Constructor. public Usage ( ) ;

// Add a kmer with the corresponding number of occurrences. public add (String kmer, int count) ;

// Return the number of occurrences of kmer. public int getCount (String kmer) ; // Return al L kmers with their count.

public LinkedList> getCounts ( ) ;

// This class represents a pair. This class must be used as it is without modifications .

public class Pair { public U first; public V second; public Pair (U first, V second) { this. first = first; this. second = second;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions