Skip to content

Commit

Permalink
🔀 Merge pull request #26 from cnr-ibba/devel
Browse files Browse the repository at this point in the history
🔖 release v0.3.0
  • Loading branch information
bunop authored Jun 28, 2024
2 parents 5d4de3f + 26147d0 commit abfc12e
Show file tree
Hide file tree
Showing 49 changed files with 935 additions and 993 deletions.
572 changes: 289 additions & 283 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smarter-frontend",
"version": "0.2.2",
"version": "0.3.0-0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down Expand Up @@ -28,7 +28,7 @@
"zone.js": "^0.11.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.10",
"@angular-devkit/build-angular": "^14.2.13",
"@angular/cli": "~14.2.4",
"@angular/compiler-cli": "^14.2.12",
"@types/jasmine": "~4.0.0",
Expand Down
131 changes: 72 additions & 59 deletions src/app/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
<h1 class="free-text">About the SMARTER database</h1>

<div flex fxLayout="row" fxLayoutAlign="center center">
<div fxFlex="90">

<h1>About the SMARTER Database</h1>

<p>
The SMARTER project site is a place where WP4 partners of the
<a href="https://www.smarterproject.eu/">Smarter project</a>
can browse and access their data.
<a href="https://www.smarterproject.eu/">SMARTER project</a>
can browse and access their data. This dataset is now open and available
to the community.
</p>

<h2>The SMARTER project</h2>
<h2>The SMARTER Project</h2>

<p>
Small ruminant populations play a fundamental role for the livelihood and
Small ruminant populations play a fundamental role in the livelihood and
socio-economic well-being of human settlements, especially in marginal areas
of Europe. Under-utilized sheep and goat breeds may be highly valuable in
increasing the profitability of small ruminant farming in such marginal areas.
These breeds are valuable because they have peculiar and often atypical
genetic make-up which make them a potentially extraordinary resource to
be exploited for adaptation to (harsh) environments, resilience to farming
increasing the profitability of small ruminant farming in these marginal areas.
These breeds are valuable because they have unique and often atypical
genetic make-ups, making them potentially extraordinary resources for
adaptation to harsh environments, resilience to farming
conditions, resistance to biotic and abiotic stressors, and the production
of quality of products of animal origin.
of high-quality animal products.
</p>

<p>
In this particular context, WP4 aims to address knowledge gaps concerning
In this context, WP4 aims to address knowledge gaps concerning
genetic diversity in goats and sheep. Its objective is to identify genetic
factors that contribute to their ability to adapt to climate conditions and,
more broadly, to withstand environmental disturbances.
Available datasets relevant to the genomic characterization
were identified and furthermore comprehensive data on hardy and under-utilized
Available datasets relevant to genomic characterization
were identified, and comprehensive data on hardy and under-utilized
breeds were collected, including genotypes, phenotypes, and environmental
measurements associated with rearing conditions.
To ensure consistency, the recording of this data was standardized: genotypes
Expand All @@ -40,78 +42,89 @@ <h2>The SMARTER project</h2>
</p>

<p>
Data are made available to the community using three different instruments:
Data are made available to the community using four different instruments:
</p>

<ul>
<li>
The <a href="https://github.com/cnr-ibba/SMARTER-database">SMARTER-database</a>,
which is a collection of tools and scripts to collect, standardize and provide
to the community a collection of genotype data and metadata information
in hardy goat and sheep populations by combining new with already existing datasets.
This project is better explained and documented in its
<a href="https://smarter-database.readthedocs.io/en/latest/index.html">manual pages</a>.
</li>
<li>
The <a href="https://github.com/cnr-ibba/SMARTER-backend">SMARTER-backend</a>,
which is a REST API service developed on top of the <em>SMARTER-database</em>
which provide methods to interact and access with SMARTER data using web resources.
By using <em>SMARTER-backend</em>, you can develop softwares or scripts which get
access to SMARTER data through web, without have a local instance
of the <em>SMARTER-database</em>. An example of this is the
<a href="https://github.com/cnr-ibba/r-smarter-api">smarterapi R package</a>,
which allow to collect SMARTER data using the <em>SMARTER-backend</em>. More
information can be found in the
<a href="https://smarter-backend.readthedocs.io/en/latest/index.html">SMARTER-backend documentation</a>
and <a href="https://cnr-ibba.github.io/r-smarter-api/index.html">smarterapi manual pages</a>.
</li>
<li>
The <a href="https://github.com/cnr-ibba/SMARTER-frontend">SMARTER-frontend</a>
(<a routerLink="/">this site</a>), which is a web interface to browse <em>SMARTER-database</em>
data relying on <em>SMARTER-backend</em>.
</li>
</ul>
<ul>
<li>
The <a href="https://github.com/cnr-ibba/SMARTER-database">SMARTER database</a>,
which is a collection of tools and scripts to collect, standardize, and provide
a collection of genotype data and metadata information
on hardy goat and sheep populations by combining new and existing datasets.
This project is better explained and documented in its
<a href="https://smarter-database.readthedocs.io/en/latest/index.html">manual pages</a>.
</li>
<li>
The <a href="https://webserver.ibba.cnr.it/smarter-api/docs/">SMARTER backend</a>,
which is a REST API service developed on top of the <em>SMARTER database</em>
providing methods to interact with and access SMARTER data using web resources.
By using the <em>SMARTER backend</em>, you can develop software or scripts that access
SMARTER data via the web without needing a local instance
of the <em>SMARTER database</em>. An example of this is the
<a href="https://github.com/cnr-ibba/r-smarter-api">smarterapi R package</a>,
which allows the collection of SMARTER data using the <em>SMARTER backend</em>. More
information can be found in the
<a href="https://smarter-backend.readthedocs.io/en/latest/index.html">SMARTER backend documentation</a>
and <a href="https://cnr-ibba.github.io/r-smarter-api/index.html">smarterapi manual pages</a>.
</li>
<li>
The <a href="https://github.com/cnr-ibba/SMARTER-frontend">SMARTER frontend</a>
(<a routerLink="/">this site</a>), which is a web interface to browse <em>SMARTER database</em>
data relying on the <em>SMARTER backend</em>.
</li>
<li>
The SMARTER <a href="ftp://webserver.ibba.cnr.it/smarter/">FTP site</a>, which collects
the genotype files of the animals described in the <em>SMARTER database</em>.
</li>
</ul>

<p>
Those instrument can be used to collect metadata and other samples information: genotypes
are available for both <em>Goat and Sheep species</em> as a whole PLINK binary file for each
of the supported assemblies. Users are required to identify their samples of interest and then
subset the genotype files according their needs. Additional filtering steps
on the selected genotypes can be done to get rid of missing samples or variants.
</p>
<p>
These instruments can be used to collect metadata and other sample information. Genotypes
are available for both <em>Goat and Sheep species</em> as whole PLINK binary files for each
of the supported assemblies. You can download the genotype files from the
<a href="ftp://webserver.ibba.cnr.it/smarter/">FTP site</a> for the available assemblies.
Users are required to identify their samples of interest using the
<a href="https://github.com/cnr-ibba/SMARTER-frontend">SMARTER frontend</a>,
the <a href="https://webserver.ibba.cnr.it/smarter-api/docs/">SMARTER backend</a>, or the
<a href="https://github.com/cnr-ibba/r-smarter-api">smarterapi R package</a>.
These are three different ways to access the same data: the first one is a web interface,
the second one is a REST API service, and the third one is an R package to interact with the API service.
Users can then subset the genotype files according to their needs. Additional filtering steps
on the selected genotypes can be done to remove missing samples or variants.
</p>

<h2>About this site</h2>
<h2>About This Site</h2>

<p>
You can browse WP4 SMARTER using the different tabs. Data like samples, variants
and breed can be browsed by <em>species</em> (Goat, Sheep): you will find
a button on the top of the page which will select the data you can browse.
Data like datasets are available in the same page for both species. Here's
You can browse WP4 SMARTER data using the different tabs. Data like samples, variants,
and breeds can be browsed by <em>species</em> (Goat, Sheep). You will find
a button on the top of the page to select the data you want to browse.
Data like datasets are available on the same page for both species. Here's
a list of the site sections:
</p>

<ul>
<li>
<a routerLink="/breeds">Breeds</a>: navigate data by breeds, you can
<a routerLink="/breeds">Breeds</a>: navigate data by breeds. You can
search for a specific breed or get general information about how many samples
belong to the same breed. You can follow the links to retrieve all samples
of a particular breed.
</li>
<li>
<a routerLink="/datasets">Datasets</a>: navigate data by datasets, browse
<a routerLink="/datasets">Datasets</a>: navigate data by datasets. Browse
data relying on the files submitted by the partners or by file content. For
a <em>genotypes</em> dataset you can follow the links a retrieve all samples
a <em>genotypes</em> dataset, you can follow the links to retrieve all samples
belonging to the same dataset.
</li>
<li>
<a routerLink="/samples">Samples</a>: navigate samples by species.
You can filter out samples by filling the form fields.
You can filter samples by filling out the form fields.
</li>
<li>
<a routerLink="/variants">Variants</a>: navigate the variants used
to normalize the genotype files and collect information about their positions
and genotype codings. You can browse variants by species and
by assembly versions, and filter out variants by filling the form fields.
by assembly versions, and filter variants by filling out the form fields.
</li>
</ul>

Expand Down
16 changes: 3 additions & 13 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { Component, NgModule } from '@angular/core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { AuthGuard } from './auth/auth.guard';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
import { LoginComponent } from './auth/login/login.component';
import { DatasetsComponent } from './datasets/datasets.component';
import { DatasetDetailComponent } from './datasets/dataset-detail/dataset-detail.component';
import { DatasetResolver } from './datasets/dataset-detail/dataset-resolver.service';
Expand All @@ -21,43 +19,35 @@ import { VariantResolver } from './variants/variant-detail/variant-resolver.serv
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'about', component: AboutComponent },
{ path: 'login', component: LoginComponent },
{
path: 'breeds',
component: BreedsComponent,
canActivate: [ AuthGuard ]
component: BreedsComponent
},
{
path: 'datasets',
component: DatasetsComponent,
canActivate: [ AuthGuard ]
component: DatasetsComponent
},
{
path: 'datasets/:_id',
component: DatasetDetailComponent,
canActivate: [ AuthGuard ],
resolve: { dataset: DatasetResolver }
},
{
path: 'samples',
component: SamplesComponent,
canActivate: [ AuthGuard ]
},
{
path: 'samples/:species/:_id',
component: SampleDetailComponent,
canActivate: [ AuthGuard ],
resolve: { sample: SampleResolver }
},
{
path: 'variants',
component: VariantsComponent,
canActivate: [ AuthGuard ],
},
{
path: 'variants/:species/:_id',
component: VariantDetailComponent,
canActivate: [ AuthGuard ],
resolve: { variant: VariantResolver }
},
{
Expand Down
12 changes: 2 additions & 10 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import { Component, OnInit } from '@angular/core';

import { AuthService } from './auth/auth.service';
import { Component } from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
export class AppComponent {
title = 'SMARTER-frontend';

constructor(private authService: AuthService) { }

ngOnInit(): void {
// try authologin when starting application
this.authService.autoLogin();
}
}
10 changes: 1 addition & 9 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MaterialModule } from './material/material.module';
import { HomeComponent } from './home/home.component';
import { LoginComponent } from './auth/login/login.component';
import { HeaderComponent } from './navigation/header/header.component';
import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
import { DatasetsComponent } from './datasets/datasets.component';
import { AuthInterceptorService } from './auth/auth-interceptor.service';
import { NotFoundComponent } from './not-found/not-found.component';
import { ShortenPipe } from './shared/shorten.pipe';
import { BreedsComponent } from './breeds/breeds.component';
Expand All @@ -33,7 +31,6 @@ import { AboutComponent } from './about/about.component';
declarations: [
AppComponent,
HomeComponent,
LoginComponent,
HeaderComponent,
SidenavListComponent,
DatasetsComponent,
Expand Down Expand Up @@ -62,12 +59,7 @@ import { AboutComponent } from './about/about.component';
MaterialModule
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: AuthInterceptorService,
// required, even if it is the only interceptor defined
multi: true
}

],
bootstrap: [AppComponent]
})
Expand Down
5 changes: 0 additions & 5 deletions src/app/auth/auth-data.model.ts

This file was deleted.

28 changes: 0 additions & 28 deletions src/app/auth/auth-interceptor.service.spec.ts

This file was deleted.

39 changes: 0 additions & 39 deletions src/app/auth/auth-interceptor.service.ts

This file was deleted.

Loading

0 comments on commit abfc12e

Please sign in to comment.