Write a program that will open a blastn

Assignment Help Database Management System
Reference no: EM13545981

Question 1:

Your task is to write a GFF3 feature exporter. A user should be able to run your script like this:

$ export_gff3_feature.py --source_gff=/path/to/some.gff3 --type=gene --attribute=ID
--value=YAR003W

There are 4 arguments here that correspond to values in the GFF3 columns. In this case, your script should read the path to a GFF3 file, find any gene (column 3) which has an ID=YAR003W (column 9). When it finds this, it should use the coordinates for that feature (columns 4, 5 and 7) and the FASTA sequence at the end of the document to return its FASTA sequence.

Your script should work regardless of the parameter values passed, warning the user if no features were found that matched their query. (It should also check and warn if more than one feature matches the query.)

The output should just be printed on STDOUT (no writing to a file is necessary.) It should have a header which matches their query, like this:

>gene:ID:YAR003W
.... sequence here ...

Some bonus points will be awarded if you format the sequence portion of the FASTA output as 60-characters per line, which follows the standard.

Provide the complete source code AND the output of the program as it runs. You should do test runs with 3 features which are present in the file and 1 where you intentionally enter a feature NOT present in the file. Your script should handle this gracefully.

QUESTION 2:

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:

 

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.

Provide the complete source code AND the output of the program as it runs.

Reference no: EM13545981

Questions Cloud

What is approximate coefficient of restitution for collision : A 5-kg object moving with a velocity of 4m/s colides head on with a 10-kg object moving towards it at -3m/s. If the 10-kg object stops dead after the collision, what is the approximate coefficient of restitution for this collision
State the rate law for the reaction : The reaction of t-butyl bromide (CH3)3CBr with water to make t-butyl alcohol (CH3)3COH proceeds according to the following steps: write the rate law for the reaction
Calculate what is the moment of inertia of the pulley : A string is wrapped around a pulley with a radius of 2.0cm. The pulley is initally at rest. What is the moment of inertia of the pulley
Determine the kinetic energy of ball at its highest point : A 47.0 g golf ball is driven from the tee with an initial speed of 50.0 m/s and rises to a height of 25.6 m. (a) Neglect air resistance and determine the kinetic energy of the ball at its highest point. J (b) What is its speed when it is 10.0 m below..
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, and produce formatted output that will be written to STDOUT
Find the maximum speed of the ball during its swing : An iron ball hangs from a 21.5-m steel cable and is used in the demolition of a building at a location where the acceleration due to gravity is 9.78 m/s2. find the maximum speed of the ball during its swing
Rectangular loop of wire hangs vertically as shown in figure : A rectangular loop of wire hangs vertically as shown in the figure. A magnetic field is di- rected horizontally, perpendicular to the wire, and points out of the page at all points as rep- resented by the symbol ?.
Fundamental frequency of open organ pipe corresponds : The fundamental frequency of an open organ pipe corresponds to the B above middle C (493.9 Hz on the chromatic musical scale). The third resonance of a closed organ pipe has the same frequency. (Assume that the speed of sound in air is 343 m/s.) (a) ..
What is the coordinate of the center of mass of the stick : A thin stick is placed along the x axis so that one of its ends is at x1 = 0.00 m and the other one at x2 = 1.35 m. The stick has a non-uniform mass density ?(x) = ax b, where a = 0.349 kg/m2 and b = 0.317 kg/m. What is the coordinate of the center o..

Reviews

ska545981

8/23/2016 1:18:03 AM

Dear tutor, thanks for your reply!! i will be sending more assignments in upcoming days, thanks always for assistance..

ska545981

8/23/2016 1:17:25 AM

The program is written in MS word document which is well written program and complied perfectly while running. Thanks tutor for your quick help, i got excellent grade in Assignment and i will keep more updates in future for my upcoming homework, I would like to ask few queries regarding assignment, May i get report on program? to know more about logic and process of execution of program, i need proficient knowledge about my each course assignments, i dont want to complete my grade in just taking help, i want proficient knowledge how to course assignments are developed or completed. Thanks in advance to understand my concern, I am waiting for your reply.

Write a Review

Database Management System Questions & Answers

  Data entities of this enterprise

Consider a student club or organization in which you are a member. What are the data entities of this enterprise? List and define each entity.

  Our boss approached you to identify a solution for a

our boss approached you to identify a solution for a performance issue and system outages that have been experienced on

  Write three items contained in fat database

What does CHS stand for? List three items contained in the FAT database. List two features NTFS provides that FAT does not.

  Explain why data flow diagrams are developed in a hierarchy

Explain why data flow diagrams are developed in a hierarchy? What are the names of some levels in the hierarchy?

  The purpose of this assignment is to give you practice with

the purpose of this assignment is to give you practice with creating database structure using sql and using the insert

  Design database for keeping information of actors

Design a database for Ray. For each director, list his or her number and name and the year he or she was born. If the director is deceased, list the year of death.

  Construct a relational schema for the er-diagram

Construct a relational schema for the ER-diagram. Make sure that you correctly translate Specialization and Many-to-Many relationships. Please follow carefully the following guidelines when you ?nish this question.

  Design a set of 3nf tables for database scenario

Draw an ER diagram for your database scenario. Design a set of 3NF tables for your database scenario.

  Create a decision table that describes movement of inventory

Name four attributes that you can use to define a data flow in the grocery inventory information system.

  Use technology and information resources to research issues

Use at least three (3) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

  What messages are sent if not well-formed

Create new DOM documents for each of your .xml file and .xsl file. Use these to generate output to the browser.

  Draw dfd for placing order based on the e-r diagram

Draw a DFD (Context and Level 1) for placing an order based on the E-R diagram shown here.

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