mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Update compbio leaderboard to assignment 4
This commit is contained in:
parent
b156f90ea0
commit
0151913e61
3 changed files with 10 additions and 14 deletions
|
|
@ -123,16 +123,17 @@ class BitcoinLeaderboard(Leaderboard):
|
|||
@dataclass
|
||||
class CompbioLeaderboard(Leaderboard):
|
||||
colour: discord.Colour = field(default=discord.Colour.green())
|
||||
title: str = field(default="Leaderboard Computationele Biologie #2")
|
||||
title: str = field(default="Leaderboard Computationele Biologie #4")
|
||||
reverse: bool = False
|
||||
kmer: int = 600
|
||||
size: int = 10000
|
||||
amount: int = 10
|
||||
|
||||
def __post_init__(self):
|
||||
self.title += f" (k = {self.kmer})"
|
||||
self.title += f" ({self.size}-{self.amount})"
|
||||
super().__post_init__()
|
||||
|
||||
def get_submission_user(self, submission_id: str) -> str:
|
||||
with open("files/compbio_benchmarks_2.json", "r") as fp:
|
||||
with open("files/compbio_benchmarks_4.json", "r") as fp:
|
||||
file = json.load(fp)
|
||||
|
||||
if submission_id in file:
|
||||
|
|
@ -142,14 +143,7 @@ class CompbioLeaderboard(Leaderboard):
|
|||
return f"[# {submission_id}]"
|
||||
|
||||
def get_data(self) -> list[tuple]:
|
||||
files = {
|
||||
6: "J02459.1",
|
||||
10: "J02459.1",
|
||||
50: "J02459.1",
|
||||
600: "AF033819.3"
|
||||
}
|
||||
|
||||
url = f"https://github.ugent.be/raw/computationele-biologie/benchmarks-2022/main/reconstruction/{files[self.kmer]}.{self.kmer}mers.md"
|
||||
url = f"https://github.ugent.be/raw/computationele-biologie/benchmarks-2022/tree/main/profile_hmm/size{self.size}-amount{self.amount}.md"
|
||||
headers = {"Authorization": f"token {settings.UGENT_GH_TOKEN}"}
|
||||
result = requests.get(url, headers=headers).text
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue