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