@sjcrh/proteinpaint-server 2.15.0 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/shared/common.js CHANGED
@@ -428,6 +428,10 @@ morigin[morigingermline] = {
428
428
  'A constitutional variant found in a normal sample. The proportion is indicated by the span of the solid arc within the whole circle.',
429
429
  legend: germlinelegend
430
430
  }
431
+
432
+ morigin.germline = morigin[morigingermline]
433
+ morigin.somatic = morigin[moriginsomatic]
434
+
431
435
  export const moriginrelapse = 'R'
432
436
  morigin[moriginrelapse] = {
433
437
  label: 'Relapse',
@@ -177,7 +177,7 @@ if (!serverconfig.features) {
177
177
  serverconfig.features = {}
178
178
  }
179
179
 
180
- if (!serverconfig.backend_only) {
180
+ if (!serverconfig.backend_only && fs.existsSync(path.join(process.cwd(), './public'))) {
181
181
  const defaultTarget = path.join(serverconfig.binpath, 'cards')
182
182
  if (!serverconfig.cards) {
183
183
  serverconfig.cards = {
@@ -187,9 +187,17 @@ if (!serverconfig.backend_only) {
187
187
  }
188
188
  const cards = serverconfig.cards
189
189
  const cardsPath = path.join(process.cwd(), './public/', cards.path)
190
+
191
+ let cardsSymlink
192
+ try {
193
+ cardsSymlink = fs.lstatSync(cardsPath)
194
+ } catch (e) {
195
+ cardsSymlink = false
196
+ }
197
+
190
198
  // only set up the symlink if the user doesn't already have a custom public/${cards.path} directory
191
199
  // a user may also not specify cards.path for other reasons, in that case no need for symlink
192
- if (cards.path && !fs.existsSync(cardsPath)) {
200
+ if (cards.path && !fs.existsSync(cardsPath) && !cardsSymlink) {
193
201
  // a user may only wish to use a different public path for the cards
194
202
  // and keep the defaulf of using server/cards
195
203
  if (!cards.target) cards.target = defaultTarget
package/utils/lowess.R ADDED
@@ -0,0 +1,9 @@
1
+ library(jsonlite)
2
+
3
+ # read in data
4
+ args <- commandArgs(trailingOnly = T)
5
+ if (length(args) != 1) stop("input coordinates needed")
6
+ infile <- args[1]
7
+ data <- fromJSON(infile)
8
+ result = lowess(data$X, data$Y)
9
+ toJSON(result)
@@ -1 +0,0 @@
1
- //!!! DO NOT USE FOR geneVariant filterCTE constructor