Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post paper review #9

Merged
merged 6 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 2 additions & 49 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { Component, ElementRef, HostBinding, Inject, OnInit, OnDestroy, Renderer2, ViewEncapsulation } from '@angular/core';
import { Component, ElementRef, Inject, OnInit, OnDestroy, Renderer2, ViewEncapsulation } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Platform } from '@angular/cdk/platform';
import { Subject, Subscription } from 'rxjs';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

import { NoctuaConfigService } from '@noctua/services/config.service';
import { TranslateService } from '@ngx-translate/core';
import { NoctuaSplashScreenService } from '@noctua/services/splash-screen.service';
import { NoctuaTranslationLoaderService } from '@noctua/services/translation-loader.service';
import { NgcCookieConsentService, NgcNoCookieLawEvent, NgcStatusChangeEvent } from 'ngx-cookieconsent';


@Component({
Expand All @@ -23,18 +22,8 @@ export class AppComponent implements OnInit, OnDestroy {

private _unsubscribeAll: Subject<any>;

private popupOpenSubscription!: Subscription;
private popupCloseSubscription!: Subscription;
private initializingSubscription!: Subscription;
private initializedSubscription!: Subscription;
private initializationErrorSubscription!: Subscription;
private statusChangeSubscription!: Subscription;
private revokeChoiceSubscription!: Subscription;
private noCookieLawSubscription!: Subscription;


constructor(
private ccService: NgcCookieConsentService,
private translate: TranslateService,
private noctuaSplashScreen: NoctuaSplashScreenService,
private noctuaTranslationLoader: NoctuaTranslationLoaderService,
Expand Down Expand Up @@ -63,47 +52,11 @@ export class AppComponent implements OnInit, OnDestroy {
.subscribe((config) => {
this.noctuaConfig = config;
});
/*
this.popupOpenSubscription = this.ccService.popupOpen$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});

this.popupCloseSubscription = this.ccService.popupClose$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});


this.statusChangeSubscription = this.ccService.statusChange$.subscribe(
(event: NgcStatusChangeEvent) => {
// you can use this.ccService.getConfig() to do stuff...
});

this.revokeChoiceSubscription = this.ccService.revokeChoice$.subscribe(
() => {
// you can use this.ccService.getConfig() to do stuff...
});

this.noCookieLawSubscription = this.ccService.noCookieLaw$.subscribe(
(event: NgcNoCookieLawEvent) => {
// you can use this.ccService.getConfig() to do stuff...
}); */
}

ngOnDestroy() {
this._unsubscribeAll.next();
this._unsubscribeAll.complete();

// unsubscribe to cookieconsent observables to prevent memory leaks
this.popupOpenSubscription.unsubscribe();
this.popupCloseSubscription.unsubscribe();
this.initializingSubscription.unsubscribe();
this.initializedSubscription.unsubscribe();
this.initializationErrorSubscription.unsubscribe();
this.statusChangeSubscription.unsubscribe();
this.revokeChoiceSubscription.unsubscribe();
this.noCookieLawSubscription.unsubscribe();
}


Expand Down
7 changes: 4 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ const cookieConfig: NgcCookieConsentConfig = {
"theme": "classic",
"palette": {
"popup": {
"background": "#000000",
"text": "#ffffff",
"link": "#ffffff"
"background": "#ffffff",
"border": "#000000",
"text": "#000000",
// "link": "#ffffff"
},
"button": {
"background": "#f1d600",
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/components/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<li><a [routerLink]="['/about']">About</a></li>
<li><a [routerLink]="['/contact']">Contact Us</a></li>
<li><a href="https://uscbiostats.github.io/annoq-site/" target="_blank">Annotation Documentation</a></li>
<li><a [routerLink]="['/cookie-policy']">Cookie Policy</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/app/main/apps/annotation/services/annotation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export class AnnotationService {
this.annotationNodes = this._buildAnnotationTree(this.annotations);
this.dataSource.data = this.annotationNodes;
this.onAnnotationTreeChanged.next(this.annotationNodes);

console.log(this.annotationNodes)
});
}

Expand Down
15 changes: 1 addition & 14 deletions src/app/main/apps/snp/snp-detail/snp-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class SnpDetailComponent implements OnInit, OnDestroy {
if (!snpRow) {
return
}
this.rows = this.columnsToRows(snpRow);
this.rows = snpRow;

});
}
Expand All @@ -45,19 +45,6 @@ export class SnpDetailComponent implements OnInit, OnDestroy {
this._unsubscribeAll.complete();
}

columnsToRows(snpRow) {
const rows = [...Object.keys(snpRow)].map((name) => {
const detail = this.annotationService.findDetailByName(name);
return {
name: name,
label: detail.label ? detail.label : name,
valueType: detail.value_type,
value: snpRow[name]
}
});

return rows;
}

mapGOids(valueType, value) {
if (!value) {
Expand Down
12 changes: 10 additions & 2 deletions src/app/main/apps/snp/snp-table/snp-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,16 @@ export class SnpTableComponent implements OnInit {
}

selectSnp(row) {
this.snpService.onSnpChanged.next(row);

const details = this.snpPage.source.map((key) => {
const detail = this.annotationService.findDetailByName(key);
return {
name: key,
label: detail.label ? detail.label : key,
valueType: detail.value_type,
value: row[key]
}
});
this.snpService.onSnpChanged.next(details);
this.noctuaMenuService.openRightDrawer();

}
Expand Down
25 changes: 0 additions & 25 deletions src/app/main/pages/contact/contact.component.spec.ts

This file was deleted.

88 changes: 88 additions & 0 deletions src/app/main/pages/cookie-policy/cookie-policy.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<div class="w-100-p" noctuaPerfectScrollbar>

<div class="annoq-section section-1">
<div class="annoq-container annoq-sm-container" fxLayout="column" fxLayoutAlign="start stretch">
<h1>Cookie Policy for AnnoQ Site</h1>

<p>This is the Cookie Policy for AnnoQ Site</p>

<p><strong>What Are Cookies</strong></p>

<p>As is common practice with almost all professional websites this site uses cookies, which are tiny files that
are
downloaded to your computer, to improve your experience. This page describes what information they gather, how
we use
it and why we sometimes need to store these cookies. We will also share how you can prevent these cookies from
being
stored however this may downgrade or 'break' certain elements of the sites functionality.</p>

<p><strong>How We Use Cookies</strong></p>

<p>We use cookies for a variety of reasons detailed below. Unfortunately in most cases there are no industry
standard
options for disabling cookies without completely disabling the functionality and features they add to this site.
It is
recommended that you leave on all cookies if you are not sure whether you need them or not in case they are used
to
provide a service that you use.</p>

<p><strong>Disabling Cookies</strong></p>

<p>You can prevent the setting of cookies by adjusting the settings on your browser (see your browser Help for how
to do
this). Be aware that disabling cookies will affect the functionality of this and many other websites that you
visit.
Disabling cookies will usually result in also disabling certain functionality and features of the this site.
Therefore
it is recommended that you do not disable cookies.</p>
<p><strong>The Cookies We Set</strong></p>

<ul>
<li>
<p>Site preferences cookies</p>
<p>In order to provide you with a great experience on this site we provide the functionality to set your
preferences
for how this site runs when you use it. In order to remember your preferences we need to set cookies so that
this
information can be called whenever you interact with a page is affected by your preferences.</p>
</li>
</ul>
<p><strong>Third Party Cookies</strong></p>

<p>In some special cases we also use cookies provided by trusted third parties. The following section details
which
third party cookies you might encounter through this site.</p>

<ul>
<li>
<p>This site uses Google Analytics which is one of the most widespread and trusted analytics solution on the
web for
helping us to understand how you use the site and ways that we can improve your experience. These cookies
may
track things such as how long you spend on the site and the pages that you visit so we can continue to
produce
engaging content.</p>
<p>For more information on Google Analytics cookies, see the official Google Analytics page.</p>
</li>
</ul>

<p><strong>More Information</strong></p>

<p>Hopefully that has clarified things for you and as was previously mentioned if there is something that you
aren't
sure whether you need or not it's usually safer to leave cookies enabled in case it does interact with one of
the
features you use on our site.</p>

<p>However if you are still looking for more information then you can contact us through one of our preferred
contact
methods:</p>

<ul>
<li>Email: <a href="mailto:[email protected]" target="_blank">Email US: [email protected]</a></li>

</ul>
</div>
</div>
<annoq-footer></annoq-footer>
</div>
42 changes: 42 additions & 0 deletions src/app/main/pages/cookie-policy/cookie-policy.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import "src/@noctua/scss/noctua";
@import "src/@noctua.common/scss/noctua.common";

:host {
.annoq-sm-container {
width: 800px;
}

.annoq-section {
padding: 40px 10px;

.annoq-heading {
margin: 0 auto;
width: 800px;

h3 {
font-size: 28px;
}
}

h1 {
font-size: 40px;
}

h2 {
font-size: 30px;
}

&.section-1 {
background-color: #fff;
}

&.section-2 {
background-color: rgba($annoq-primary-color, 0.1);
}
}

p {
font-size: 18px;
line-height: 24px;
}
}
15 changes: 15 additions & 0 deletions src/app/main/pages/cookie-policy/cookie-policy.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-cookie-policy',
templateUrl: './cookie-policy.component.html',
styleUrls: ['./cookie-policy.component.scss']
})
export class CookiePolicyComponent implements OnInit {

constructor() { }

ngOnInit(): void {
}

}
25 changes: 9 additions & 16 deletions src/app/main/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ <h2>
</div>
</div>
<span fxFlex=""></span>
<div class="annoq-image" fxFlex="60%">
<img class="" src="assets/images/annoq-cloud-md.png">
<div class="annoq-video" fxFlex="65%">
<!-- <img class="" src="assets/images/annoq-cloud-md.png"> -->

<iframe width="560" height="315" src="https://www.youtube.com/embed/plaU42-x4jE" title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
</div>
</div>
</div>
Expand All @@ -55,7 +60,7 @@ <h2>
<div class="card card-stats" fxFlex="50%">
<div class="annoq-card">
<div class="annoq-stat annoq-lg-font" fxLayout="row" fxLayoutAlign="center center">
400+
600+
</div>
<div class="annoq-card-title">
Supported Annotation Types <a [routerLink]="['/detail']">More Details</a>
Expand All @@ -66,18 +71,6 @@ <h2>
</div>
<div class="annoq-section section-1">
<div class="annoq-container text-center" fxLayout="column" fxLayoutAlign="center stretch">
<!-- <h2>Introduction</h2>
<p>The Annotation Query (AnnoQ) is an integrated functional annotation platform for large scale genetic variant
annotation. It serves researchers with different background and interests. Its easy-to-use user interface and
search capabilities suit better for scientists with less bioinformatics skills, including bench scientists and
statistician. The backend of the system is a large collection of pre-annotated variants from the Haplotype
Reference Consortium (HRC) (~39 million) with sequence features (by WGSA) and functions (PANTHER and Gene
Ontology) (we plan to add ~300 millions more variants from dbSNP in the future). The data is built in an
Elasticsearch framework and an API was built to allow users to quickly access the annotation data, with one of
the
following three ways.
</p> -->

<div class="annoq-heading">
<h2>Interactive Query Access</h2>
</div>
Expand Down Expand Up @@ -327,7 +320,7 @@ <h3>We recommend the services of our trusted resources</h3>
<h2>Browser Compatibility Summary</h2>
</div>
<div class="annoq-card-description p-8 pt-0 mb-16">
For more details on AnnoQs browser support and future work, please check out
For more details on AnnoQ's browser support and future work, please check out
<a href="https://uscbiostats.github.io/annoq-site/docs/getting_started/browser_compatibility" target="_blank">
more details
</a>
Expand Down
Loading