Skip to content

Commit

Permalink
Merge pull request #414 from plantinformatics/develop
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
Don-Isdale authored Oct 22, 2024
2 parents ddb7490 + 65ed247 commit 265f76d
Show file tree
Hide file tree
Showing 354 changed files with 86,831 additions and 44,990 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
doc
tmp
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# was /backend/
/lb4app/lb3app/client
/lb4app/lb3app/tmp
/lb4app/tmp
/tmp
/log
*.log
Expand All @@ -27,3 +28,4 @@ bower_components
# etags file
TAGS
.vscodeignore
.aider*
35 changes: 20 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

# samtools build layer is based on https://hub.docker.com/r/bschiffthaler/samtools/dockerfile

ARG NODE_ALPINE_VERSION 12
ARG NODE_ALPINE_VERSION=18

# ${NODE_ALPINE_VERSION}
FROM node:12-alpine as node-alpine-build-samtools
FROM node:18-alpine as node-alpine-build-samtools

ARG NODE_ALPINE_VERSION 12
ARG NODE_ALPINE_VERSION=18
ARG SAMTOOLS_VERSION=1.15.1
ARG BUILD_NCPU=1

Expand Down Expand Up @@ -74,10 +74,10 @@ WORKDIR /
#-------------------------------------------------------------------------------

# ${NODE_ALPINE_VERSION}
FROM node:12-alpine as node-alpine-pretzel
FROM node:18-alpine as node-alpine-pretzel

ARG PRETZEL_VERSION 2.15.0
ARG NODE_ALPINE_VERSION 12
ARG PRETZEL_VERSION 2.17.8
ARG NODE_ALPINE_VERSION 18

# node-sass version is selected so that the binary can be downloaded;
# otherwise, node-gyp will be built, and hence the following dependencies on python, make, c++.
Expand Down Expand Up @@ -105,8 +105,7 @@ RUN apk add --no-cache git \
terminus-font \
curl \
jq \
openssh \
&& npm install bower -g
openssh


# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -155,29 +154,35 @@ RUN mkdir $NODE_BE $NODE_BE/bin $NODE_BE/lib
COPY --from=node:16-alpine /usr/local/bin $NODE_BE/bin
COPY --from=node:16-alpine /usr/local/lib $NODE_BE/lib


# may be required later, for upgradeFrontend2 : -g rollup && npm install [email protected]
RUN date \
&& ls -sF $NODE_BE/lib \
&& export PATH=$NODE_BE/bin:$PATH \
&& export NODE_PATH=$NODE_BE/lib/node_modules \
&& cd $NODE_BE/lib && npm -v && node -v \
&& npm config set scripts-prepend-node-path true \
&& cd /app && npm install [email protected] && npm ci \
&& cd /app && npm install -g rollup && npm install [email protected] [email protected] && npm ci \
&& date


RUN node --version
RUN cd /frontend && (npm ci || npm install) && bower install --allow-root
RUN cd /frontend && (npm ci || npm install)

# RUN cd /app && npm install [email protected] && npm ci

RUN cd /frontend && node_modules/ember-cli/bin/ember build --environment production
ARG ROOT_URL
ENV ROOT_URL=${ROOT_URL}
LABEL ROOT_URL=${ROOT_URL}
# if sass binary binding not available may need : npm rebuild node-sass &&
#
# ROOT_URL should be configurable via e.g. --build-arg ROOT_URL=/app
# or can hard-wired here via : && ROOT_URL=/pretzelUpdate
RUN cd /frontend && npm rebuild node-sass && echo ROOT_URL=${ROOT_URL} && node_modules/ember-cli/bin/ember build --environment production

RUN ( [ ! -L /app/client ] || rm /app/client ) && \
mv /frontend/dist /app/client \
&& cd / \
&& rm -rf /frontend \
&& npm uninstall -g bower \
&& npm cache clean --force

ENV EMAIL_VERIFY=NONE AUTH=ALL
Expand All @@ -187,10 +192,10 @@ ENTRYPOINT ["/usr/local/node16/bin/node", "/app/lb3app/server/server.js"]

# ------------------------------------------------------------------------------

ARG NODE_ALPINE_VERSION 12
ARG NODE_ALPINE_VERSION=18
ARG SAMTOOLS_VERSION=1.15.1
ARG bcftoolsVer=1.15.1
ARG PRETZEL_VERSION 2.15.0
ARG PRETZEL_VERSION=2.17.8


LABEL maintainer='github.com/plantinformatics'
Expand Down
116 changes: 116 additions & 0 deletions doc/notes/design_diagram_genotype_web_API.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- using jsdelivr for css because unpkg gets :
Refused to apply style from 'https://unpkg.com/[email protected]/dist/mermaid.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.css">
</head>

<body>

<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>

<script>
mermaid.initialize({startOnLoad:true});
</script>

<!-- based on copy of ./design_diagram_dnaSequenceSearch.html, via design_diagram_vcfFeature.html
-->

<h1>
<a id="user-content-design" class="anchor" href="#design" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>
Design
</h1>
<h2>
<a id="user-content-explorer-CF-data-flow-diagrams" class="anchor" href="#explorer-CF-data-flow-diagrams" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>
Design diagram showing the Genotype web API requests
</h2>

<!-- seems like recent versions of mermaid css make this additional formatting unnecessary, and possibly not used. -->
<!-- for local editing, change href to mermaid_classDiagram.css -->
<link type="text/css" rel="Stylesheet" href="https://cdn.jsdelivr.net/gh/plantinformatics/pretzel/doc/notes/mermaid_classDiagram.css" />

<!-- Note below about clearfix. -->
<div class="clearfix">

<h2>Custom API</h2>

<div class="mermaid classDiagram" style="width: 100%;" >
sequenceDiagram
participant C as Pretzel Frontend GUI
participant S as Pretzel Server

C->>S: Blocks/vcfGenotypeLookup
create participant B as bcftools
S->>B: bcftools query or view
destroy B
B->>S: VCF result
S->>C: VCF result
</div>
<!-- destroy B -->

<h2>BrAPI</h2>
<div class="mermaid classDiagram" style="width: 100%;" >
sequenceDiagram

participant C as Pretzel Frontend GUI
participant S as Pretzel Server

C->>S: brapi/v2/search/allelematrix
create participant B as bcftools
S->>B: bcftools query or view
destroy B
B->>S: VCF result
S->>C: allelematrix result

</div>

<!--
/** not used */
: !
-->

<div class="clearfix">
</div>

<p>
Notes :
<ul>
<li></li>
</ul>
</p>



<p>Code links</p>
<ul>
<li><a href="https://github.com/plantinformatics/vcf-genotype-brapi/blob/develop/src/utils/data/vcf-feature.js">vcf-genotype-brapi/blob/develop/src/utils/data/vcf-feature.js</a></li>
<li><a href="https://github.com/plantinformatics/pretzel/blob/feature/ongoingGenotype/frontend/app/services/auth.js">frontend/app/services/auth.js</a></li>
</ul>

<div class="clearfix">
</div>


<p> Diagram drawn by :
<a href="https://mermaidjs.github.io/">Mermaid</a>,
github <a href="https://github.com/knsv/mermaid">readme</a>
</p>

<hr>
<!-- Use either this, or class="clearfix" on the previous div. -->
<div style="clear:both">
</div>



</body>
</html>
123 changes: 123 additions & 0 deletions doc/notes/design_diagram_vcfFeature.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- using jsdelivr for css because unpkg gets :
Refused to apply style from 'https://unpkg.com/[email protected]/dist/mermaid.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.css">
</head>

<body>

<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>

<script>
mermaid.initialize({startOnLoad:true});
</script>

<!-- based on copy of ./design_diagram_dnaSequenceSearch.html, with call graph extracted by aider
-->

<h1>
<a id="user-content-design" class="anchor" href="#design" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>
Design
</h1>
<h2>
<a id="user-content-explorer-CF-data-flow-diagrams" class="anchor" href="#explorer-CF-data-flow-diagrams" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>
Design diagram showing the calls between function defined within vcf-feature.js
</h2>

<!-- seems like recent versions of mermaid css make this additional formatting unnecessary, and possibly not used. -->
<!-- for local editing, change href to mermaid_classDiagram.css -->
<link type="text/css" rel="Stylesheet" href="https://cdn.jsdelivr.net/gh/plantinformatics/pretzel/doc/notes/mermaid_classDiagram.css" />

<!-- Note below about clearfix. -->
<div class="clearfix">


<div class="mermaid classDiagram" style="width: 100%;" >
graph TD

A(vcf-feature.js functions) --> |calls| B(featureMafFilter)
A --> |calls| C(featureCallRateFilter)
A --> |calls| D(featuresFilterNalleles)
A --> |calls| E(genotypeSNPFiltersApply)
A --> |calls| F(featuresSampleMAF)
A --> |calls| G(featureSampleMAF)
A --> |calls| H(vcfFeatures2MatrixView)
A --> |calls| I(vcfFeatures2MatrixViewRows)
A --> |calls| J(rowsAddFeature)
A --> |calls| K(annotateRowsFromFeatures)
A --> |calls| L(featuresValuesFields)
A --> |calls| M(featureSampleNames)
A --> |calls| N(objectSymbolNameArray)
A --> |calls| O(genotypeSNPFiltersDefined)
</div>

<div class="mermaid classDiagram" style="width: 100%;" >
graph TD

B(featureMafFilter) --> |used by| P(vcfFeatures2MatrixView)
C(featureCallRateFilter) --> |used by| Q(vcfFeatures2MatrixViewRows)
D(featuresFilterNalleles) --> |used by| R(vcfFeatures2MatrixViewRows)
E(genotypeSNPFiltersApply) --> |used by| S(vcfFeatures2MatrixView)
F(featuresSampleMAF) --> |used by| T(vcfFeatures2MatrixViewRows)
G(featureSampleMAF) --> |used by| U(vcfFeatures2MatrixViewRows)
H(vcfFeatures2MatrixView) --> |used by| V(vcfFeatures2MatrixViewRowsResult)
I(vcfFeatures2MatrixViewRows) --> |used by| W(vcfFeatures2MatrixViewRows)
J(rowsAddFeature) --> |used by| X(vcfFeatures2MatrixViewRowsResult)
K(annotateRowsFromFeatures) --> |used by| Y(vcfFeatures2MatrixViewRowsResult)
L(featuresValuesFields) --> |used by| Z(vcfFeatures2MatrixViewRowsResult)
M(featureSampleNames) --> |used by| AA(vcfFeatures2MatrixViewRows)
N(objectSymbolNameArray) --> |used by| AB(vcfFeatures2MatrixViewRowsResult)
O(genotypeSNPFiltersDefined) --> |used by| AC(vcfFeatures2MatrixView)


</div>

<!--
/** not used */
: !
-->

<div class="clearfix">
</div>

<p>
Notes :
<ul>
<li></li>
</ul>
</p>



<p>Code links</p>
<ul>
<li><a href="https://github.com/plantinformatics/pretzel/blob/feature/ongoingGenotype/frontend/app/utils/data/vcf-feature.js">frontend/app/utils/data/vcf-feature.js</a></li>
</ul>

<div class="clearfix">
</div>


<p> Diagram drawn by :
<a href="https://mermaidjs.github.io/">Mermaid</a>,
github <a href="https://github.com/knsv/mermaid">readme</a>
</p>

<hr>
<!-- Use either this, or class="clearfix" on the previous div. -->
<div style="clear:both">
</div>



</body>
</html>
4 changes: 0 additions & 4 deletions frontend/.bowerrc

This file was deleted.

8 changes: 7 additions & 1 deletion frontend/.ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
*/
"liveReload": true,
"watcher": "polling",
"disableAnalytics": true
"disableAnalytics": true,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
5 changes: 5 additions & 0 deletions frontend/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
Loading

0 comments on commit 265f76d

Please sign in to comment.