Write a program that will open a blastn

Assignment Help Python Programming
Reference no: EM13718086

QUESTION:

The GFF3 format is a commonly-used one in bioinformatics for representing sequence annotation. You can find the specification here:

Note that this same file has both the annotation feature table and the FASTA sequence for the molecules referenced. (See the '##FASTA' directive in the specification.) Within the feature table another column of note is the 9th, where we can store any key=value pairs relevant to that row's feature such as ID, Ontology_term or Note.

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:

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 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.

Provide the complete source code AND the output of the program as it runs BLASTP output file,

/home/jorvis1/example_blast.txt

to your home directory.

Look through the file and explore the format.

Reference no: EM13718086

Questions Cloud

Determine whether vaporization is a major concern : In coal gasifiers, refractories and metals must withstand the coal/air or coal/oxygen combusting atmospheres. The Zr-Nb-Ti system is under consideration as alternative to the Fe and Ni alloy systems because the coal combustion degrades these alloy sy..
Explain a foundational knowledge of childrens development : Analyzing child development research and find one additional scholarly source - Explain a foundational knowledge of children''s development?
What is the pressure of this same gas : A tank of oxygen holds 14.0L of oxygen (O2) at a pressure of 30.0atm . When the gas is released, it provides 230.L of oxygen. What is the pressure of this same gas at a volume of 230.L and constant temperature?
Data from this table of thermodynamic properties : Use the data from this table of thermodynamic properties to calculate the maximum amount of work that can be obtained from the combustion of 1.00 moles of ethane, CH3CH3(g), at 25 °C and standard conditions.
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
Design an automatic speed control for an automobile : We wish to design an automatic speed control for an automobile. Assuming that pure integral control (that is, no proportional term) is advantageous; select the feedback gain so that the roots have critical damping (? = 1).
Melt along the interface between the fe-si alloy-al coating : Your company is considering creating an alumina coating by immersing an Fe-Si alloy into an Al melt, withdrawing the coated Fe-Si, and then oxidizing the Al coated alloy at 1000°C in air to form an alumina coating.
Describe what a riser is in the context of sand casting : Describe what a riser is in the context of sand casting. What are its main functions? In light of Chvorinovs rule, what should be taken into account when determining the geometry, dimension, and location of a riser in a sand casting mold?
Volume rate of flow and time required to fill mold cavity : A mold has a downsprue of length = 6.0 in. The cross-sectional area at the bottom of the sprue is 0.45 in2. The sprue leads into a horizontal runner which feeds the mold cavity, whose volume = 75 in3. Determine (a) the velocity of the molten metal fl..

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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