Skip to content
Snippets Groups Projects

Draft: remove all content for review (DO NOT MERGE!)

Open Alex Kanitz requested to merge review_milestone_2 into master

This branch and merge request is for reviewing your code and code structure. It is only for the purpose of reviewing and should never be merged! Note that any changes made to the repo by you after creation of this merge request are not considered for this review. Please also note that we will not review code style here (we will use automatic tools for that in a future session), but rather we will keep feedback high level at this point. Please address any issues raised (if you haven't already addressed them on your own in the meantime).

Next to the in-line and general code comments we will give during the review sessions (done by me and Mihaela), we keep track of the status of the more formal requirements (i.e., not the actual code) with respect to repository setup, packaging and documentation in the following checklist. Please complete any pieces that remain after the "List checked by reviewers" was set to "Yes" by us (indicating that we are done checking your repo against the checklist). To address these, please check the relevant notebooks and homeworks for more info.

List checked by reviewers

  • Yes
  • No

Version control

  • Repo configured correctly: repo public; default branch protected against pushes; fast-forward merges; encourage squash commits; delete source branch by default
  • License available in file LICENSE without any file extension
  • .gitignore available and includes common Python artifacts; no such artifacts (e.g., from building/packaging) are under version control
  • Files organized as expected, with at least one and not more than three directories, all in lower case; one directory containing all the tool/app code and named after the app (required), one directory tests containing all test-related content (required if tests or test files are available), and one directory named img or images, containing the screenshots from exercise 1 (fine if omitted or deleted at this point); all other files (LICENSE, README.md, .gitignore, setup.py, etc.) in repository root directory

Packaging

  • setup.py available
  • CLI executable available
  • CLI arguments available
  • Tool can be successfully installed with pip install .
  • CLI executable can be successfully executed with -h option

Documentation

  • README.md has at least a synopsis, usage and installation instructions and contact information (can use zavolab-biozentrum@unibas.ch if you don't want to put your own); other sections, as outlined in the course materials, welcome
  • Google-style docstrings available for all modules, classes, functions, methods
  • Type hints provided at least for all functions & methods
Edited by Alex Kanitz

Merge request reports

Ready to merge by members who can write to the target branch.

Merge details

  • The source branch is 45 commits behind the target branch.
  • 0 commits and 1 merge commit will be added to .
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
README.md deleted 100644 → 0
41 ## Usage/Examples
42
43 ```python script
44
45
46 ```
47
48
49 ## License
50
51 [MIT](https://choosealicense.com/licenses/mit/) license, Copyright (c) 2022 Zavolan Lab, Biozentrum, University of Basel
52
53
54 ## Contributers
55 Samuel Mondal, Ahmed Hassan Hussein H.Mahmoud, Gina Boot
56
  • 1 import argparse
    2 import logging
    3 from pre_bedtools import exon_extraction_from_gtf
    4 from exon_concatenation import exon_concatenation
    5 from polyA import PolyA_generator
    6 from list_to_file import list_to_file
    7
    8 parser = argparse.ArgumentParser(
    9 prog = 'transcript_sequence_extractor',
    10 description = 'extracts transcript sequences from genome sequence and ouputs transcripts with PolyA tail added to them')
  • 4
    5
    6 exons = gtf[gtf[2]=="exon"]
    7 feat = list(exons[8])
    8 superlist = []
    9 idlist = []
    10 for x in range(len(feat)):
    11 newlist = feat[x].split(";")
    12 superlist.append(str(newlist[2])[16:-1])
    13 idlist.append(str(newlist[0])[9:-1])
    14
    15
    16 bed = {"chr":exons[0],"start":exons[3],"end":exons[4],"transcript_id":superlist,"score":exons[5],"strand":exons[6],"gene_id":idlist}
    17 class bed:
    18 def__init__(self, exons, chr, start, end, transcript_id, score, strand, gene_id):
    19 self.exons = exons
    • If you do have isolated the parts of the gtf line to pass them to the "bed" class constructor, what's the need for the class? It does not have additional methods defined... Please think what are the conceptual tasks that you need to solve and start from there to decide whether or not and if so where you need to define classes.

    • Please register or sign in to reply
  • 34
    35 Returns
    36 -------
    37 Class
    38 A class which defines columns in standard BED format.
    39
    40
    41
    42 Raises
    43 ------
    44 TypeError
    45 ValueError: Not all columns found in GTF.
    46 """
    47 bed = pd.DataFrame(bed)
    48 bed.to_csv("bed_file.bed",sep="\t",index=False)
    49 bed[(bed["gene_id"]=="ENSG00000160072")|(bed["gene_id"]== "ENSG00000142611")|(bed["gene_id"]=="ENSG00000232596")].to_csv("test.bed",sep="\t",index=False,header=None)
  • 1 def list_to_file(
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading