Comments (33)
should be removed from https://github.com/exercism/x-common/blob/master/rna-transcription.json as well
from problem-specifications.
@martinfreedman Fair point.
This exercise has been a bit of a mess, because when I implemented it, I was thinking only of the basic RNA transcription process. I think there are two interesting things that have come out of this discussion:
- The more interesting exercise goes both ways
- As described in the current (or any of the previous) descriptions, there's a lot of room for confusion.
My recommendation here would be to deprecate the existing exercise and create a new one that goes both ways, framing the problem without so much room for confusion. This would mean a better name and a better description based on the new framing.
from problem-specifications.
I always thought this made sense from the programming side even if it's nonsense in terms of biology: it makes sure the solution doesn't hard code values but abstracts by e.g. defining source -> target "maps" that can be passed to the algo used.
I would value this more than consistency with reality. Maybe we could rephrase and state that sometimes we find isolated RNA and want to know what DNA strand it resulted from...
from problem-specifications.
I assume those implementations do translate it both ways.
rna-transcription/Example.cs, rna-transcription/Example.fs, rna-transcription/example.js, rna-transcription/example.rb, rna-transcription/RnaTranscriptionExample.swift
from problem-specifications.
thanks
from problem-specifications.
So this should just be a matter of simplifying the exercises by taking out backwards transcription? I could start with ruby
. I could also open issues in each language track where this occurs.
from problem-specifications.
Yepp, that should be enough. Opening an issue in each track would be great, thanks!
from problem-specifications.
I can grab this issue for the ruby and js implementations and update the test and example files accordingly. I could take a crack at the swift, fsharp and csharp ones but... no promises that they'll be idiomatic 😆
Also I'll probably check around and see if they exist in the other language tracks.
Oh well... this will simplify this exercise but there are a bunch of other cool bio related exercises also from Rosalind that we can pull in. Also, this may lower the bar of entry a bit for people getting into exercism... so that's always a plus.
from problem-specifications.
Here's the list of languages that have implemented the exercise: http://x.exercism.io/problems/rna-transcription
from problem-specifications.
I checked xecmascript track and it only implements DNA to RNA (rna-transcription exercise).
from problem-specifications.
Sweet! 👍
from problem-specifications.
playing devil's advocate here:
Even though there is no biological process for transcribing RNA to DNA, I would have still considered it acceptable to have a function that asks "So, given this RNA sequence, what DNA sequence would have produced it?". That could have been the intent of the RNA->DNA question.
Nevertheless, I am not invested in either of the two possible outcomes (keep RNA->DNA or remove RNA->DNA), only that we are consistent.
Okay, both tracks that I have observed only have DNA->RNA, so if we decided that we actually wanted RNA->DNA it would actually have caused extra work to add the missing direction, so I actually slightly favor "don't transcript both ways" (What we have already decided), so that's good!
from problem-specifications.
I have to admit to @petertseng, as long as “reverse transcription” is still in the json, I can't see any reasons to remove it from the tracks.
If you want to deprecate something, you should start to deprecate it at the central authority ;)
from problem-specifications.
OK, so the question is: do we want to have the "which DNA sequence would have produced it", or should we remove it from the JSON? I don't have a strong opinion either way. I don't think that the reverse transcription adds much value in terms of design, but I haven't looked at actual solutions to this for a very long time, so I could just be missing context.
from problem-specifications.
At least in the Ruby track I have seen many submissions which do have code duplication by implementing both methods by hand, while one can write one hash, one method which swaps the letters and the methods needed which simply wrap that helper. So from a design point there is value in having both directions.
But I'd prefer to have only one direction, since only one is valid from a biological point of view as far as I've understood the discussion so far.
from problem-specifications.
Yeah. Let's leave it to the conversation on the site to talk about hard-coded values vs other approaches. I'll fix the JSON.
from problem-specifications.
@chezwicker You're right that it helps avoid hard-coding. I'm not sure if it's enough to make this part of the discussion. Or perhaps we can add it to the README as an extension or "something to think about".
from problem-specifications.
Sure, that works as well - I guess it goes back to the old discussion about whether comments / documentation are a good thing. My view is that they are as long as what they are saying can't be expressed in code, but aren't otherwise. I would have mapped that to saying that if a requirement can be defined in a test, that's better than in a README ;-)
from problem-specifications.
It's true. I wish I had gotten y'alls point of view before I submitted all those issues!
from problem-specifications.
BTW I may be remembering this wrong, I was a Bio major (15 years ago things change) but I think transcription does go both ways. DNA produces RNA in humans, but I think some other organisms inject RNA into DNA by reverse transcribing it, Viruses and possibly Bacteria. I believe that is how gene therapy works: using a virus vector to inject DNA and I think it goes via RNA. But I'll double check.
In any case the exercise from a programming stand point works as a encode/decode and I with chez wicker it is valid even if biologically not right.
from problem-specifications.
Yeah, there are viruses (reverse transcriptase for instance), but it's a bit of an edge case. I would rather stick with the basics and if we introduce the inverse, use the what DNA sequence would produce this argument. (I was a genetics major, but it's also been over a decade since I spent any time thinking about this).
from problem-specifications.
Ha ha I just go confirmation that retro-viruses use it. I forgot you were a genetics major.
from problem-specifications.
It appears to me that the only thing keeping this issue open is exercism/plsql#11, that issue could probably just be closed. Also it seems to me the choice to test RNA -> DNA conversion should maybe be a track level decision.
from problem-specifications.
I'll close this one. The PL/SQL issue doesn't seem resolved, even if it sounds like they decided to override the description.
from problem-specifications.
WTF! https://en.wikipedia.org/wiki/Reverse_transcriptase! This not only has a biological basis, but removing it ruins, AFAICS, the whole point of this exercise which becomes completely trivial. Even if there were not a biological argument, that could be noted and still be part of the exercise.
from problem-specifications.
@kytrinyx I am up for doing that.
Already rewrote the c# version (tests etc.) for myself.
I would call it "nucleotide-transcription"
Need to clone the problem-specifications git and make sure I can build out correctly into the csharp exercise and compare to my "original".
Then I could PR either separately or all together metadata.yml, description.md and canonical-data.json
Is this the right way to go about doing this?
UPDATE: Read up on contributing.md so ignore this last question
from problem-specifications.
@kytrinyx I just to make sure you are aware of the comments that were made in #1078 starting here that I think tie into this issue.
from problem-specifications.
One question on the canonical-data-schema
How do I re-use variables within different tests? e.g in c#/xunit I have:-
const string _dna = "GATGGAACTTGACTACGTAAATT";
const string _rna = "CTUCCTTGUUCTGUTGCUTTTUU";
...
[Fact]
public void Rna_complement()
{
Assert.Equal(_rna, Transcription.ToRna(_dna));
}
[Fact]
public void Rna_to_dna_to_rna_double_transcription_produces_original_rna_strand()
{
Assert.Equal(_rna, Transcription.ToRna(Transcription.ToDna(_rna)));
}
...
from problem-specifications.
from problem-specifications.
JSON doesn't "run". Take a look at the file canonical-data.json for rna-transcription. It is up to the track maintainers to write the tests for their language based on what the JSON file describes. Some tracks have developed programs to generate test suites from the JSON while other tracks generate their test suites by hand from the JSON. The canonical-data simply describes what each test is testing, what property it is testing, what the input might be, and what the expected output might be. I use the word might because it is possible sometimes for test cases to not have input or an expected output. However, place holders for input
and expected
are always included in the JSON.
I see that @coriolinus summed it up nicely.
from problem-specifications.
Understood.
So shall I proceed @kytrinyx. Create a new issue first, or continue here?
from problem-specifications.
from problem-specifications.
I am up for doing that.
Excellent! Let's discuss the details and hash out a name there (at first blush "nucleotide-transcription" sounds good, but I'd love to have some space to actually discuss it and get input from others).
just to make sure you are aware of the comments that were made in #1078
@rpottsoh Ah, yepp. I'll deal with that there. I don't mind that we've defined it differently at all.
Create a new issue first, or continue here?
@martinfreedman Go ahead and start clean in a new issue. I'm going to re-close this one.
Thanks everyone for your patience and input in getting this all optimized for both clarity and learning.
from problem-specifications.
Related Issues (20)
- Use consistent writting styles for Special blocks HOT 2
- ci: should use shellcheck
- fetch-configlet: script is outdated
- fetch-configlet: consider removing scripts from this repo
- saddle-points: directions seem mixed up
- ci: workflow doesn't run on push
- scale-generator: Accepted solution for "octatonic" scale seems incorrect. HOT 1
- Yarn lock has security issues HOT 12
- Can there be negative Armstrong numbers? HOT 1
- Set up prettier for markdown files HOT 8
- `rational-numbers` missing test cases for "exponentiation of a given rational number to a real (floating-point) power" HOT 1
- "Hello World" description: is "so that it produces the string" misleading? HOT 2
- pig latin in C track HOT 2
- Exercise asks developer to write a function HOT 10
- Saddle Points: geq & leq HOT 2
- Variability of expected output in errors in Hamming exercise HOT 1
- Duplicated test cases in collatz-conjecture/canonical-data.json HOT 2
- Improve the description of square root problem HOT 4
- New test case for Phone Number exercise HOT 1
- Queen Attack Description appears to be wrong HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from problem-specifications.