Write a program that will open a blastn

Assignment Help Computer Engineering
Reference no: EM132154798

Use any BLASTP output file.

Write a program that will open a BLASTN (nucleotide to nucleotide search) output file, parse out specific information, and produce formatted output that will be written to STDOUT (i.e. Standard Output; the terminal window / command line). Before writing your program, copy the BLASTP output file, /home/jorvis1/example_blast.txt to your home directory. Look through the file and explore the format.

Your program should start by opening the input file (you may hardcode the filename in this case), parsing and storing both the query sequence ID (from near the top of the file; look for the string following "Query=") and the query length (found on the line below the query sequence), and displaying them both to STDOUT. Add some additional characters and formatting to your output such that these two fields appear exactly like this in STDOUT:

Query ID: IREALLYLIKEPYTHON Query Length: 15

Then, it is time to parse information about the significant alignments for this query. Each alignment begins with the ">" symbol. For just the first ten hits, parse out only the accession (located between the first set of pipe symbols, | | ), length and score. For each of these hits, these three fields should then be written to STDOUT in exactly this format including capitalization, spacing, and punctuation (as shown here using the real values for the first hit; study the file to understand exactly where these values came from):

Alignment #1: Accession = ref|XM_005094338.1| (Length = 2377, Score = 1098)

You must use regular expressions to pull out precisely the parts of the file that you want, which is the definition of parsing. Hint: you will very likely need to use parentheses to put some parts of those expressions into temporary memory (m.group(1), etc.) for later use.

Do not have your regular expression search for hardcoded values; your program should be able to read another BLASTN output file and run successfully, not just this specific one.

Pay careful attention to the exact appearance of the sample output, above. Although it is a good start to be able to, at a minimum, report the requested values, your program must also strive to match the formats specified.

Verified Expert

This project is done using python programming language.Here tokens are recognized using regular expression.Python has a package named re which has built in functions to search for regular expression in the given line of text.

Reference no: EM132154798

Questions Cloud

Create a list that have the same values as the pets array : Create a list that have the same values as the pets array (just create: if you want you can display the items - your choice)
Perform a binary search on a sorted array or vector : Write a function (recursive, or not) called search which performs a binary search on a sorted array or vector.
Explain all the nonnegative floating point number : Compare the difference of 4 bits IEEE Std 754-1985 similar floating point number representation and the binary number system.
Write a program called that accepts as arguments files : Write a C++ program called that accepts as arguments two files that contain these compressed upper triangular matrices.
Write a program that will open a blastn : Write a program that will open a BLASTN (nucleotide to nucleotide search) output file, parse out specific information.
How many passes would be required to complete the sort : If you were to use a bubble sort to re-sort these elements into descending order, how many passes would be required to complete the sort?
Design a program should contain a class : If the user indicates that they are not a member, they should be prompted to enter their information for registration.
How digital platforms used to increase market penetration : MIK 304 & MEB 301 E-MARKETING STRATEGIES ASSIGNMENT - Give details on how digital platforms can be used to increase market penetration
Write a function called coffee that takes no input variables : Create an M-file named coffee.m and write a function called coffee that takes no input variables and returns no output value.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determined through default conventions

An advantage of dynamic scoping is that access to nonlocal variables is considerably faster than accesses to nonlocals when static scoping is used.

  What would you say to a vendor that tells you

What would you say to a vendor that tells you that his system runs 50% of the SPEC benchmark kernel programs twice as fast as the leading competitive system? Which statistical fallacy is at work here?

  Write a test program that prompts the user to enter

Write a test program that prompts the user to enter a two dimensional list and displays the location of the largest element in the list.

  How do you look at a visual representation of a binary tree

How do you look at a visual representation of a binary tree (the diagram starting with root and ending with leaves) and determine how many levels it has?

  Write a single statement to display the number of digits

Write the statement to instantiate a package to do input and output with US_Gallons. Write a single statement to display the number of digits of precision used.

  List possible media solutions that will support download

List three possible media solutions that will support this download, along with their advantages and disadvantages.

  Draw a network diagram of a suitable gate arrangement

These devices are to be used in conjunction with a logic network of AND and OR gates and the output of the network is to be 1 when two or more of the sensing devices are producing signals of 1 - Draw a network diagram of a suitable gate arrangemen..

  What do you think is more important for a good it

1. many people have a hard time taking a systems view when it comes to managing projects. why do you think this is the

  Why is cyber security so complex in cloud technology

Why is cyber security so complex in cloud technology? Concisely explain the complexities of cyber security in cloud technology?

  What is the smallest accurate big-oh notation for finding

What is the smallest accurate big-Oh notation for finding an optimal tour for a travelling sales person problem on a graph with with V vertices?

  Compute the decimal value of this number

Compute the decimal value of this number using the exponent and significand from the previous part; show your work.

  Conduct research and provide a two page apa response

conduct research and provide a two page apa response. describe and discuss the following topics regarding base-case

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd