Skip to content

Commit b8f0ebf

Browse files
authored
Merge pull request #47 from gogepp/dev
Release 0.4.8
2 parents 31a109a + f575f82 commit b8f0ebf

70 files changed

Lines changed: 2701 additions & 6113 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
77

8+
## [0.4.8] 2023-10-20
9+
10+
### Added
11+
12+
- Option for redirecting the search to an external url ("public.redirectSearch" key in config)
13+
- An additional key "public.redirectSearchAttribute", defaulting to 'query', will be used as the get parameter attribute. (ie: url + "?redirectSearchAttribute=query")
14+
- Options for using a remote search ending, and merging the results with GNB internal search.
15+
- The 'public.externalSearch' option need to be set to true, and an 'externalSearchOptions' dict need to be set.
16+
- 'url' key is the remote endpoint where the query will be sent
17+
- 'gene_field' is the remote field to get the gene IDs (default to geneId)
18+
- 'query_param' : optional get parameter to use for the query
19+
- 'field_param': optional get parameter to use to restrict the results to the gene_field value
20+
- 'count_param': optional get parameter to restrict the number of results
21+
- Multiple annotations for the same genome
22+
- When adding an annotation, you must now set the '--annot' to set the annotation name.
23+
- When integrating data afterward, you can use the --annot tag to specify the annotation you are aiming for.
24+
- If you have multiple genes with the same ID, and do not specify '--annot', the results may be variables
25+
- You can specify --annotations multiple time when integrating orthogroups
26+
- Will now decode proteins and genes IDs when integrating data. (It was already done when integrating gffs, so there was some mismatch with IDs)
27+
28+
## Changed
29+
30+
- Various UI fixes to better fit multiple annotation versions
31+
- Including an 'annotation' selector in the gene list
32+
833
## [0.4.7] 2023-09-26
934

1035
### Fixed
@@ -399,4 +424,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
399424
[0.1.3]: https://github.com/genenotebook/genenotebook/compare/v0.1.2...v0.1.3
400425
[0.1.2]: https://github.com/genenotebook/genenotebook/compare/v0.1.1...v0.1.2
401426
[0.1.1]: https://github.com/genenotebook/genenotebook/compare/v0.1.0...v0.1.1
402-

cli/genoboo.js

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,14 @@ addAnnotation
318318
.arguments('<file>')
319319
.option('-u, --username <username>', 'GeneNoteBook admin username')
320320
.option('-p, --password <password>', 'GeneNoteBook admin password')
321-
.option(
321+
.requiredOption(
322322
'-n, --name <genome-name>',
323323
'Reference genome name to which the annotation should be added.',
324324
)
325+
.requiredOption(
326+
'--annot <annotation-name>',
327+
'Annotation name',
328+
)
325329
.option(
326330
'-r, --re_protein <pattern>',
327331
'Replacement string for the protein name using capturing groups defined by --re_protein_capture. Make sure to use JS-style groups ($1 for group 1)',
@@ -352,6 +356,7 @@ addAnnotation
352356
password,
353357
port = 3000,
354358
name,
359+
annot,
355360
re_protein,
356361
re_protein_capture,
357362
attr_protein,
@@ -389,6 +394,7 @@ addAnnotation
389394
{
390395
fileName,
391396
genomeName: name,
397+
annotationName: annot,
392398
re_protein,
393399
re_protein_capture: correctProteinCapture,
394400
attr_protein,
@@ -433,6 +439,10 @@ running GeneNoteBook server.`
433439
'--port [port]',
434440
'Port on which GeneNoteBook is running. Default: 3000'
435441
)
442+
.option(
443+
'--annot <annotation-ame>',
444+
'Annotation name',
445+
)
436446
.option(
437447
'-fmt, --format [parser]',
438448
`Choose a parser for the diamond output format. Parses .xml, .txt
@@ -455,7 +465,7 @@ running GeneNoteBook server.`
455465
.action(
456466
(
457467
file,
458-
{ username, password, port = 3000, format, algorithm, matrix, database }
468+
{ username, password, port = 3000, annot, format, algorithm, matrix, database }
459469
) => {
460470
if (typeof file !== 'string') addDiamond.help();
461471

@@ -490,6 +500,7 @@ file extension is not "xml", "txt"`);
490500
fileName,
491501
parser: parserType,
492502
program: 'diamond',
503+
annot: annot,
493504
algorithm: algorithm,
494505
matrix: matrix,
495506
database: database,
@@ -502,7 +513,7 @@ file extension is not "xml", "txt"`);
502513
Example:
503514
genenotebook add diamond mmucedo.xml -u admin -p admin
504515
or
505-
genenotebook add diamond mmucedo.txt --format txt --program blastp --matrix BLOSUM90 -db "Non-reundant protein sequences (nr)" -u admin -p admin
516+
genenotebook add diamond mmucedo.txt --format txt --matrix BLOSUM90 -db "Non-reundant protein sequences (nr)" -u admin -p admin
506517
`);
507518
})
508519
.exitOverride(customExitOverride(addDiamond));
@@ -525,6 +536,10 @@ running GeneNoteBook server.`
525536
'-p, --password <adminPassword>',
526537
'GeneNoteBook admin password'
527538
)
539+
.option(
540+
'--annot <annotation-ame>',
541+
'Annotation name',
542+
)
528543
.option(
529544
'--port [port]',
530545
'Port on which GeneNoteBook is running. Default: 3000'
@@ -548,7 +563,7 @@ running GeneNoteBook server.`
548563
.action(
549564
(
550565
file,
551-
{ username, password, port = 3000, format, algorithm, matrix, database }
566+
{ username, password, port = 3000, annot, format, algorithm, matrix, database }
552567
) => {
553568
if (typeof file !== 'string') addBlast.help();
554569

@@ -584,6 +599,7 @@ file extension is not "xml", "txt"`);
584599
parser: parserType,
585600
program: 'blast',
586601
algorithm: algorithm,
602+
annot: annot,
587603
matrix: matrix,
588604
database: database,
589605
}
@@ -619,6 +635,10 @@ addExpression
619635
'-d, --sample-description <description>',
620636
'Description of the experiment'
621637
)
638+
.option(
639+
'--annot <annotation-ame>',
640+
'Annotation name',
641+
)
622642
.option(
623643
'-r, --replicas <replicas...>',
624644
'Comma-separated column positions, which are part of the same replica group. Can be set multiple times for multiple groups. The replica group name will be the first column, unless replica-names is set'
@@ -639,7 +659,7 @@ addExpression
639659
const replicas = opts.replicas || [];
640660
const replicaNames = opts.replicaNames || [];
641661
const isPublic = opts.public;
642-
662+
const annot = opts.annot
643663
if (!(fileName && username && password)) {
644664
program.help();
645665
}
@@ -648,6 +668,7 @@ addExpression
648668
{
649669
fileName,
650670
description,
671+
annot,
651672
replicas,
652673
replicaNames,
653674
isPublic
@@ -680,6 +701,10 @@ addExpression
680701
'-d, --sample-description <description>',
681702
'Description of the experiment'
682703
)
704+
.option(
705+
'--annot <annotation-ame>',
706+
'Annotation name',
707+
)
683708
.option(
684709
'--public',
685710
'Set the generated replica groups as public. Default: false',
@@ -692,6 +717,7 @@ addExpression
692717
const replicaGroup = opts.replicaGroup || fileName;
693718
const description = opts.sampleDescription || 'description';
694719
const isPublic = opts.public
720+
const anot = opts.annot
695721

696722
if (!(fileName && username && password)) {
697723
program.help();
@@ -701,6 +727,7 @@ addExpression
701727
{
702728
fileName,
703729
sampleName,
730+
annot: annot,
704731
replicaGroup,
705732
description,
706733
isPublic
@@ -728,12 +755,16 @@ addInterproscan
728755
'--port [port]',
729756
'Port on which GeneNoteBook is running. Default: 3000'
730757
)
758+
.option(
759+
'--annot <annotation-ame>',
760+
'Annotation name',
761+
)
731762
.option(
732763
'--format [parser]',
733764
`Choose a parser for the interproscan output files. Parses .gff3 and .tsv
734765
extensions.`
735766
)
736-
.action((file, { username, password, port = 3000, format }) => {
767+
.action((file, { username, password, port = 3000, format, annot }) => {
737768
if (typeof file !== 'string') addInterproscan.help();
738769

739770
const fileName = path.resolve(file);
@@ -766,6 +797,7 @@ file extension is not "tsv", "gff3" or "xml".`);
766797
{
767798
fileName,
768799
parser: parserType,
800+
annot: annot
769801
}
770802
);
771803
})
@@ -794,11 +826,15 @@ addEggnog
794826
'-p, --password <adminPassword>',
795827
'GeneNoteBook admin password'
796828
)
829+
.option(
830+
'--annot <annotation-ame>',
831+
'Annotation name',
832+
)
797833
.option(
798834
'--port [port]',
799835
'Port on which GeneNoteBook is running. Default: 3000'
800836
)
801-
.action((file, { username, password, port = 3000 }) => {
837+
.action((file, { username, password, port = 3000, annot }) => {
802838
if (typeof file !== 'string') addEggnog.help();
803839

804840
const fileName = path.resolve(file);
@@ -808,6 +844,7 @@ addEggnog
808844

809845
new GeneNoteBookConnection({ username, password, port }).call('addEggnog', {
810846
fileName,
847+
annot: annot
811848
});
812849
})
813850
.on('--help', () => {
@@ -833,11 +870,15 @@ addHectar
833870
'-p, --password <adminPassword>',
834871
'GeneNoteBook admin password'
835872
)
873+
.option(
874+
'--annot <annotation-ame>',
875+
'Annotation name',
876+
)
836877
.option(
837878
'--port [port]',
838879
'Port on which GeneNoteBook is running. Default: 3000'
839880
)
840-
.action((file, { username, password, port = 3000 }) => {
881+
.action((file, { username, password, port = 3000, annot }) => {
841882
if (typeof file !== 'string') addHectar.help();
842883

843884
const fileName = path.resolve(file);
@@ -847,6 +888,7 @@ addHectar
847888

848889
new GeneNoteBookConnection({ username, password, port }).call('addHectar', {
849890
fileName,
891+
annot: annot
850892
});
851893
})
852894
.on('--help', () => {
@@ -878,17 +920,23 @@ addOrthogroups
878920
'-f, --force [force]',
879921
'Ignore the use of prefixes.',
880922
)
923+
.option(
924+
'-a, --annotations <annotations...>',
925+
'Name of the annotation to use for gene matching. Can be set multiple times'
926+
)
881927
.requiredOption('-u, --username <username>', 'GeneNoteBook admin username')
882928
.requiredOption('-p, --password <password>', 'GeneNoteBook admin password')
883929
.option(
884930
'--port [port]',
885931
'Port on which GeneNoteBook is running. Default: 3000'
886932
)
887-
.action((file, { prefixe, list, force, username, password, port = 3000 }) => {
933+
.action((file, { prefixe, list, force, annotations, username, password, port = 3000 }) => {
888934
if (typeof file !== 'string') addOrthogroups.help();
889935
const folderName = path.resolve(file);
890936
const prefixes = (typeof list !== 'undefined' ? list : path.resolve(prefixe));
891937

938+
annotations = annotations || []
939+
892940
if (!(folderName && username && password)) {
893941
addOrthogroups.help();
894942
}
@@ -899,6 +947,7 @@ addOrthogroups
899947
folderName,
900948
force,
901949
prefixes,
950+
annotations
902951
},
903952
);
904953
})

config.json.template

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
"disable_user_login": false,
55
"disable_user_registration": false,
66
"blast_link": "",
7-
"expression_unit": "My unit"
7+
"expression_unit": "My unit",
8+
"externalSearch": false,
9+
"redirectSearch": "",
10+
"redirectSearchAttribute": ""
11+
},
12+
"externalSearchOptions": {
13+
"url": "http://0.0.0.0:80",
14+
"gene_field": "gene_id",
15+
"query_param": "q",
16+
"field_param": "display_fields",
17+
"count_param": "max_results"
818
}
919
}

imports/api/api.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import './genomes/removeGenome.js';
1717
import './genomes/annotation/removeAnnotationTrack.js';
1818
import './genomes/annotation/addAnnotation.js';
1919

20-
import './genes/interproscan.js';
2120
import './genes/addInterproscan.js';
2221
import './genes/eggnog/addEggnog.js';
2322
import './genes/hectar/addHectar.js';

0 commit comments

Comments
 (0)