Skip to content

Commit ea1859a

Browse files
ADDITIONAL_IDS -> INDEXED_IDS
1 parent 95e2b3c commit ea1859a

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

packages/apollo-collaboration-server/src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const validationSchema = Joi.object({
5757
DESCRIPTION: Joi.string(),
5858
FEATURE_TYPE_ONTOLOGY_LOCATION: Joi.string(),
5959
PLUGIN_LOCATION: Joi.string(),
60-
ADDITIONAL_IDS: Joi.string().default('gff_id'),
60+
INDEXED_IDS: Joi.string().default('gff_id'),
6161
ALLOW_ROOT_USER: Joi.boolean().default(false),
6262
ROOT_USER_PASSWORD: Joi.string(),
6363
ROOT_USER_PASSWORD_FILE: Joi.string(),

packages/apollo-common/src/AssemblySpecificChange.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ export abstract class AssemblySpecificChange extends Change {
3131

3232
getIndexedIds(
3333
feature: AnnotationFeatureSnapshot,
34-
additionalIds: string[] | undefined,
34+
idsToIndex: string[] | undefined,
3535
): string[] {
3636
const indexedIds: string[] = []
37-
for (const additionalId of additionalIds ?? []) {
37+
for (const additionalId of idsToIndex ?? []) {
3838
const idValue = feature.attributes?.[additionalId]
3939
if (idValue) {
4040
indexedIds.push(idValue[0])
4141
}
4242
}
4343
if (feature.children) {
4444
for (const child of Object.values(feature.children)) {
45-
const childIndexedIds = this.getIndexedIds(child, additionalIds)
45+
const childIndexedIds = this.getIndexedIds(child, idsToIndex)
4646
indexedIds.push(...childIndexedIds)
4747
}
4848
}

packages/apollo-shared/src/Changes/AddFeatureChange.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ export class AddFeatureChange extends FeatureChange {
8989
let featureCnt = 0
9090
logger.debug?.(`changes: ${JSON.stringify(changes)}`)
9191

92-
const { ADDITIONAL_IDS } = process.env
93-
let additionalIds: string[] | undefined
94-
if (ADDITIONAL_IDS) {
95-
additionalIds = ADDITIONAL_IDS.split(',')
92+
const { INDEXED_IDS } = process.env
93+
let idsToIndex: string[] | undefined
94+
if (INDEXED_IDS) {
95+
idsToIndex = INDEXED_IDS.split(',')
9696
}
9797

9898
// Loop the changes
@@ -112,7 +112,7 @@ export class AddFeatureChange extends FeatureChange {
112112

113113
// CopyFeature is called from CopyFeature.tsx
114114
if (copyFeature) {
115-
const indexedIds = this.getIndexedIds(addedFeature, additionalIds)
115+
const indexedIds = this.getIndexedIds(addedFeature, idsToIndex)
116116
// Add into Mongo
117117
const [newFeatureDoc] = await featureModel.create(
118118
[{ ...addedFeature, allIds, indexedIds, status: -1, user }],
@@ -150,7 +150,7 @@ export class AddFeatureChange extends FeatureChange {
150150
} else {
151151
const childIds = this.getChildFeatureIds(addedFeature)
152152
const allIdsV2 = [_id, ...childIds]
153-
const indexedIds = this.getIndexedIds(addedFeature, additionalIds)
153+
const indexedIds = this.getIndexedIds(addedFeature, idsToIndex)
154154
const [newFeatureDoc] = await featureModel.create(
155155
[{ allIds: allIdsV2, indexedIds, status: 0, ...addedFeature }],
156156
{ session },

packages/apollo-shared/src/Changes/FromFileBaseChange.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ export abstract class FromFileBaseChange extends AssemblySpecificChange {
184184
}
185185

186186
async addFeatureIntoDb(gff3Feature: GFF3Feature, backend: ServerDataStore) {
187-
const { ADDITIONAL_IDS } = process.env
188-
let additionalIds: string[] | undefined
189-
if (ADDITIONAL_IDS) {
190-
additionalIds = ADDITIONAL_IDS.split(',')
187+
const { INDEXED_IDS } = process.env
188+
let idsToIndex: string[] | undefined
189+
if (INDEXED_IDS) {
190+
idsToIndex = INDEXED_IDS.split(',')
191191
}
192192
const { assembly, refSeqCache } = this
193193
const { featureModel, refSeqModel, user } = backend
@@ -214,7 +214,7 @@ export abstract class FromFileBaseChange extends AssemblySpecificChange {
214214
}
215215
const newFeature = gff3ToAnnotationFeature(gff3Feature, refSeqDoc._id)
216216
const allIds = this.getAllIds(newFeature)
217-
const indexedIds = this.getIndexedIds(newFeature, additionalIds)
217+
const indexedIds = this.getIndexedIds(newFeature, idsToIndex)
218218

219219
// Add into Mongo
220220
// We cannot use Mongo 'session' / transaction here because Mongo has 16 MB limit for transaction

packages/website/docs/02-installation/04-configuration-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ MICROSOFT_CLIENT_SECRET=client_secret_here
6464
# Defaults to relative URL 'sequence_ontology.json'
6565
# FEATURE_TYPE_ONTOLOGY_LOCATION=sequence_ontology.json
6666

67-
# Comma-separated list of additional attributes in features to treat as ids
67+
# Comma-separated list of attributes in features to treat as ids
6868
# These will be added to feature documents' "indexedIds"
6969
# Defaults to gff_id
70-
# ADDITIONAL_IDS=gff_id,gene_id,transcript_id,exon_id
70+
# INDEXED_IDS=gff_id,gene_id,transcript_id,exon_id
7171

7272
# Application port, defaults to 3999
7373
# PORT=3999

0 commit comments

Comments
 (0)