Write a program that will open a blastn output file

Assignment Help Computer Engineering
Reference no: EM132210395

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.

Python.

Reference no: EM132210395

Questions Cloud

Do the temperature correction on a mercury barometer : Write a program in MATLAB to do the temperature correction on a mercury barometer reading (see problem 1.70).
Write about the significance of the artworks : You'll need to write about the significance of the artworks, For example, you may write "I selected Picasso's Guernica because it tells the story of an actual.
Compare the results with and without output : Compare the results with and without output. Fill out the chart for each algorithm, both with output and without.
Division-department formal strategic planning process : Give an example of a company/division/department formal strategic planning process?
Write a program that will open a blastn output file : Write a program that will open a BLASTN (nucleotide to nucleotide search) output file, parse out specific information, and produce formatted.
Discuss the processes used to business processes and system : Discuss the processes used to business processes and system use cases
Print out the average of the set of numbers : Print out how many values are larger than the average and how many are smaller than the average. Pass average as a parameter.
As an emerging market-gross domestic product : As an emerging market, the BRIC countries comprise a great deal of GDP (Gross Domestic Product) and engage in global trade.
What is the overall strategy of document management : What is the overall strategy of a document management company?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Prepare functional specifications for the companys use of

you are to select one business thatnbspdoes not alreadynbsphave a websitenbspand develop an internet strategy for it.

  Trace the progression of physical modeling

Trace the progression of physical modeling throughout the development cycle of a system familiar to you.

  What would the result of the syntax

What would the result of the syntax.

  Use the web to research and evaluate security products from

in a two-page apa formatted paper provide analysis answering the followinguse the web to research and evaluate security

  Describe how mass media uses these technological innovations

Describe how the chemical and electronic technology of photography, recording, and transmission has advanced from initial discovery to the present. Describe how mass media uses these technological innovations.

  What code and why make browser not compatibility

what is browser compatibility, what code and why make browser not compatibility?

  Determine how long the heater should be kept on

The water in a 40-L tank is to be heated from 15°C to 45°C by a 6-cm-diameter spherical heater whose surface temperature is maintained at 85°C.

  Describe that can we create its equivalent serial schedule

Describe that can we create its equivalent serial schedule. If yes then how else why?

  How will the procedures for making changes to user accounts

How will the procedures for making changes to the user accounts, such as password changes, be different for remote users?

  Create a one-page document detailing the actions required

Create a 1-page document detailing the actions required to configure VPN, routing, and direct access services in Windows Server 2012 R2 to give buyers remote.

  Create a folder called raw data to store collected raw data

NIT6130 Introduction to Research Assignment - Experiment Design & Result Analysis. Create a folder called "raw data" to store the collected raw data

  Computer hardware purchases over the next five years

what criteria will you use to make the purchases.

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