Implementez la méthode findGeneSimple
pour trouver les gènes dans les brins d'ADN
Created
October 5, 2023 11:08
-
-
Save nherbaut/d0117c9d989a487bf8ea7ecbba2cbe5f to your computer and use it in GitHub Desktop.
L2.3.5 Recherche Simple de gènes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class TagFinder { | |
public static String findGeneSimple(String dna) { | |
//codon début = ATG | |
//codon fin = TAA | |
return ""; | |
} | |
public static void main(String ...args) { | |
{ | |
String dna1 = "ATGGGGTTTAAATAATAATAG"; | |
String gene1 = findGeneSimple(dna1); | |
System.out.println(gene1); | |
} | |
{ | |
String dna2 = "AAATGCCCATGGGGTTTAAATAATAATAGTTCAA"; | |
String gene2 = findGeneSimple(dna2); | |
System.out.println(gene2); | |
} | |
// et si la chaine ne contient pas ATG? | |
{ | |
String dna3 = "GGCTATTTAGGGTTAA"; | |
String gene3 = findGeneSimple(dna3); | |
System.out.println(gene3); | |
} | |
// et si la chaine ne contient pas TAA | |
{ | |
String dna4 = "ATGGGCTATTTAGGGTTAG"; | |
String gene4 = findGeneSimple(dna4); | |
System.out.println(gene4); | |
} | |
//et si les codons étaient groupés par 3? | |
{ | |
String dna3 = "ATGGTTAA"; | |
String gene3 = findGeneSimple(dna3); | |
System.out.println(gene3); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
execute me on https://java.miage.dev/?gistId=d0117c9d989a487bf8ea7ecbba2cbe5f