Skip to content

Commit

Permalink
cfd and donech scores separated as options
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinpoudel committed Sep 26, 2021
1 parent c673b4c commit 8acca71
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 125 deletions.
192 changes: 99 additions & 93 deletions coverage.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" ?>
<coverage branch-rate="0" branches-covered="0" branches-valid="0" complexity="0" line-rate="0.7" lines-covered="651" lines-valid="930" timestamp="1632030952654" version="5.5">
<coverage branch-rate="0" branches-covered="0" branches-valid="0" complexity="0" line-rate="0.6976" lines-covered="653" lines-valid="936" timestamp="1632681467403" version="5.5">
<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
<source>/Users/ravinpoudel/Documents/GuideMaker_ALL/GuideMaker/guidemaker</source>
</sources>
<packages>
<package branch-rate="0" complexity="0" line-rate="0.7" name=".">
<package branch-rate="0" complexity="0" line-rate="0.6976" name=".">
<classes>
<class branch-rate="0" complexity="0" filename="__init__.py" line-rate="1" name="__init__.py">
<methods/>
Expand Down Expand Up @@ -64,7 +64,7 @@
<line hits="1" number="78"/>
</lines>
</class>
<class branch-rate="0" complexity="0" filename="cli.py" line-rate="0.109" name="cli.py">
<class branch-rate="0" complexity="0" filename="cli.py" line-rate="0.1062" name="cli.py">
<methods/>
<lines>
<line hits="1" number="6"/>
Expand Down Expand Up @@ -103,45 +103,45 @@
<line hits="0" number="63"/>
<line hits="0" number="64"/>
<line hits="0" number="65"/>
<line hits="0" number="67"/>
<line hits="0" number="69"/>
<line hits="1" number="72"/>
<line hits="0" number="73"/>
<line hits="0" number="75"/>
<line hits="1" number="78"/>
<line hits="0" number="85"/>
<line hits="0" number="66"/>
<line hits="0" number="68"/>
<line hits="0" number="70"/>
<line hits="1" number="73"/>
<line hits="0" number="74"/>
<line hits="0" number="76"/>
<line hits="1" number="79"/>
<line hits="0" number="86"/>
<line hits="0" number="92"/>
<line hits="0" number="87"/>
<line hits="0" number="93"/>
<line hits="0" number="95"/>
<line hits="0" number="97"/>
<line hits="0" number="99"/>
<line hits="0" number="94"/>
<line hits="0" number="96"/>
<line hits="0" number="98"/>
<line hits="0" number="100"/>
<line hits="0" number="101"/>
<line hits="0" number="102"/>
<line hits="1" number="105"/>
<line hits="0" number="108"/>
<line hits="0" number="103"/>
<line hits="1" number="106"/>
<line hits="0" number="109"/>
<line hits="0" number="110"/>
<line hits="0" number="112"/>
<line hits="0" number="115"/>
<line hits="0" number="111"/>
<line hits="0" number="113"/>
<line hits="0" number="116"/>
<line hits="0" number="117"/>
<line hits="0" number="118"/>
<line hits="0" number="119"/>
<line hits="0" number="120"/>
<line hits="0" number="122"/>
<line hits="0" number="121"/>
<line hits="0" number="123"/>
<line hits="0" number="124"/>
<line hits="0" number="125"/>
<line hits="0" number="126"/>
<line hits="0" number="127"/>
<line hits="0" number="129"/>
<line hits="0" number="131"/>
<line hits="0" number="128"/>
<line hits="0" number="130"/>
<line hits="0" number="132"/>
<line hits="0" number="133"/>
<line hits="0" number="135"/>
<line hits="0" number="137"/>
<line hits="0" number="134"/>
<line hits="0" number="136"/>
<line hits="0" number="138"/>
<line hits="0" number="139"/>
<line hits="0" number="140"/>
Expand All @@ -150,57 +150,55 @@
<line hits="0" number="143"/>
<line hits="0" number="144"/>
<line hits="0" number="145"/>
<line hits="0" number="147"/>
<line hits="0" number="149"/>
<line hits="0" number="146"/>
<line hits="0" number="148"/>
<line hits="0" number="150"/>
<line hits="0" number="151"/>
<line hits="0" number="152"/>
<line hits="0" number="154"/>
<line hits="0" number="153"/>
<line hits="0" number="155"/>
<line hits="0" number="156"/>
<line hits="0" number="158"/>
<line hits="0" number="160"/>
<line hits="0" number="157"/>
<line hits="0" number="159"/>
<line hits="0" number="161"/>
<line hits="0" number="163"/>
<line hits="0" number="162"/>
<line hits="0" number="164"/>
<line hits="0" number="165"/>
<line hits="0" number="166"/>
<line hits="0" number="167"/>
<line hits="0" number="169"/>
<line hits="0" number="168"/>
<line hits="0" number="170"/>
<line hits="0" number="171"/>
<line hits="0" number="172"/>
<line hits="0" number="173"/>
<line hits="0" number="174"/>
<line hits="0" number="176"/>
<line hits="0" number="175"/>
<line hits="0" number="177"/>
<line hits="0" number="178"/>
<line hits="0" number="179"/>
<line hits="0" number="180"/>
<line hits="0" number="181"/>
<line hits="0" number="183"/>
<line hits="0" number="182"/>
<line hits="0" number="184"/>
<line hits="0" number="185"/>
<line hits="0" number="186"/>
<line hits="0" number="187"/>
<line hits="0" number="188"/>
<line hits="0" number="189"/>
<line hits="0" number="190"/>
<line hits="0" number="191"/>
<line hits="0" number="192"/>
<line hits="0" number="193"/>
<line hits="0" number="194"/>
<line hits="0" number="195"/>
<line hits="0" number="196"/>
<line hits="0" number="197"/>
<line hits="0" number="198"/>
<line hits="0" number="199"/>
<line hits="0" number="200"/>
<line hits="0" number="201"/>
<line hits="0" number="203"/>
<line hits="0" number="204"/>
<line hits="0" number="205"/>
<line hits="0" number="206"/>
<line hits="0" number="207"/>
<line hits="0" number="208"/>
<line hits="0" number="209"/>
<line hits="0" number="210"/>
<line hits="0" number="211"/>
Expand All @@ -223,9 +221,15 @@
<line hits="0" number="228"/>
<line hits="0" number="229"/>
<line hits="0" number="230"/>
<line hits="0" number="231"/>
<line hits="0" number="232"/>
<line hits="0" number="233"/>
<line hits="0" number="234"/>
<line hits="0" number="235"/>
<line hits="0" number="236"/>
</lines>
</class>
<class branch-rate="0" complexity="0" filename="core.py" line-rate="0.8657" name="core.py">
<class branch-rate="0" complexity="0" filename="core.py" line-rate="0.8662" name="core.py">
<methods/>
<lines>
<line hits="1" number="2"/>
Expand Down Expand Up @@ -606,97 +610,99 @@
<line hits="1" number="850"/>
<line hits="1" number="851"/>
<line hits="1" number="852"/>
<line hits="1" number="853"/>
<line hits="1" number="854"/>
<line hits="1" number="855"/>
<line hits="1" number="856"/>
<line hits="1" number="858"/>
<line hits="1" number="859"/>
<line hits="1" number="857"/>
<line hits="1" number="860"/>
<line hits="1" number="861"/>
<line hits="1" number="862"/>
<line hits="1" number="863"/>
<line hits="1" number="864"/>
<line hits="1" number="865"/>
<line hits="1" number="866"/>
<line hits="1" number="867"/>
<line hits="1" number="868"/>
<line hits="1" number="869"/>
<line hits="1" number="870"/>
<line hits="1" number="871"/>
<line hits="1" number="872"/>
<line hits="1" number="873"/>
<line hits="1" number="875"/>
<line hits="1" number="877"/>
<line hits="1" number="878"/>
<line hits="1" number="879"/>
<line hits="1" number="880"/>
<line hits="1" number="881"/>
<line hits="1" number="883"/>
<line hits="1" number="884"/>
<line hits="1" number="885"/>
<line hits="1" number="886"/>
<line hits="1" number="888"/>
<line hits="1" number="890"/>
<line hits="1" number="895"/>
<line hits="1" number="896"/>
<line hits="1" number="898"/>
<line hits="1" number="899"/>
<line hits="1" number="900"/>
<line hits="1" number="901"/>
<line hits="1" number="902"/>
<line hits="1" number="904"/>
<line hits="1" number="905"/>
<line hits="1" number="907"/>
<line hits="1" number="918"/>
<line hits="1" number="919"/>
<line hits="0" number="915"/>
<line hits="0" number="916"/>
<line hits="1" number="920"/>
<line hits="1" number="921"/>
<line hits="1" number="923"/>
<line hits="0" number="934"/>
<line hits="0" number="935"/>
<line hits="1" number="939"/>
<line hits="1" number="946"/>
<line hits="1" number="927"/>
<line hits="0" number="938"/>
<line hits="0" number="939"/>
<line hits="0" number="941"/>
<line hits="0" number="951"/>
<line hits="0" number="952"/>
<line hits="0" number="953"/>
<line hits="0" number="954"/>
<line hits="0" number="957"/>
<line hits="0" number="958"/>
<line hits="0" number="960"/>
<line hits="0" number="970"/>
<line hits="0" number="971"/>
<line hits="0" number="972"/>
<line hits="0" number="973"/>
<line hits="0" number="976"/>
<line hits="0" number="968"/>
<line hits="0" number="979"/>
<line hits="0" number="987"/>
<line hits="0" number="998"/>
<line hits="0" number="1006"/>
<line hits="0" number="988"/>
<line hits="0" number="990"/>
<line hits="0" number="991"/>
<line hits="0" number="992"/>
<line hits="0" number="993"/>
<line hits="0" number="994"/>
<line hits="1" number="997"/>
<line hits="0" number="1007"/>
<line hits="0" number="1008"/>
<line hits="0" number="1009"/>
<line hits="0" number="1010"/>
<line hits="0" number="1011"/>
<line hits="0" number="1012"/>
<line hits="0" number="1013"/>
<line hits="1" number="1016"/>
<line hits="0" number="1026"/>
<line hits="0" number="1027"/>
<line hits="0" number="1028"/>
<line hits="0" number="1029"/>
<line hits="0" number="1030"/>
<line hits="0" number="1031"/>
<line hits="0" number="1032"/>
<line hits="0" number="1033"/>
<line hits="0" number="1035"/>
<line hits="0" number="1036"/>
<line hits="0" number="1037"/>
<line hits="0" number="1038"/>
<line hits="0" number="1039"/>
<line hits="0" number="1040"/>
<line hits="0" number="1041"/>
<line hits="0" number="1014"/>
<line hits="0" number="1016"/>
<line hits="0" number="1017"/>
<line hits="0" number="1018"/>
<line hits="0" number="1019"/>
<line hits="0" number="1020"/>
<line hits="0" number="1021"/>
<line hits="0" number="1022"/>
<line hits="1" number="1025"/>
<line hits="1" number="1035"/>
<line hits="1" number="1036"/>
<line hits="1" number="1037"/>
<line hits="1" number="1038"/>
<line hits="1" number="1039"/>
<line hits="1" number="1044"/>
<line hits="1" number="1045"/>
<line hits="1" number="1046"/>
<line hits="1" number="1047"/>
<line hits="1" number="1048"/>
<line hits="1" number="1049"/>
<line hits="1" number="1050"/>
<line hits="1" number="1051"/>
<line hits="1" number="1052"/>
<line hits="1" number="1054"/>
<line hits="1" number="1055"/>
<line hits="1" number="1056"/>
<line hits="1" number="1057"/>
<line hits="1" number="1058"/>
<line hits="1" number="1061"/>
<line hits="1" number="1060"/>
<line hits="1" number="1062"/>
<line hits="1" number="1063"/>
<line hits="1" number="1064"/>
<line hits="1" number="1065"/>
<line hits="0" number="1067"/>
<line hits="0" number="1068"/>
<line hits="1" number="1067"/>
<line hits="1" number="1068"/>
<line hits="1" number="1069"/>
<line hits="1" number="1070"/>
<line hits="1" number="1071"/>
<line hits="0" number="1073"/>
<line hits="0" number="1074"/>
<line hits="1" number="1075"/>
</lines>
</class>
<class branch-rate="0" complexity="0" filename="definitions.py" line-rate="1" name="definitions.py">
Expand Down
8 changes: 7 additions & 1 deletion guidemaker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def myparser():
help='List of sequence representing restriction enzymes. Default: None.', default=[])
parser.add_argument('--filter_by_locus', nargs="*",
help='List of locus tag. Default: None.', default=[])
parser.add_argument('--doench_efficiency_score',help='Doench et al. 2016 - only for NGG PAM: None.', action='store_true')
parser.add_argument('--doench_efficiency_score',help='Doench et al. 2016 - only for NGG PAM: Default: None.', action='store_true')
parser.add_argument('--cfd_score',help='CFD score for assessing off-target activity of gRNAs: Default: None.', action='store_true')
parser.add_argument('--keeptemp', help="Option to keep intermediate files be kept", action='store_true')
parser.add_argument('--plot', help="Option to genereate guidemaker plots", action='store_true')
parser.add_argument('--config', help="Path to YAML formatted configuration file, default is " +
Expand Down Expand Up @@ -183,6 +184,11 @@ def main(arglist: list = None):
if args.doench_efficiency_score:
logging.info("Creating Efficiency Score based on Doench et al. 2016 - only for NGG PAM...")
prettydf = guidemaker.core.get_doench_efficiency_score(df=prettydf, pam_orientation=args.pam_orientation)

if args.cfd_score:
logging.info("Calculating CFD score for assessing off-target activity of gRNAs")
prettydf = guidemaker.core.cfd_score(df=prettydf)

fd_zero = prettydf['Feature distance'].isin([0]).sum()
logging.info("Number of Guides within a gene coordinates i.e. zero Feature distance: %d", fd_zero)
if not os.path.exists(args.outdir):
Expand Down
Loading

0 comments on commit 8acca71

Please sign in to comment.