Skip to content

Commit

Permalink
Merge pull request #47 from gogepp/dev
Browse files Browse the repository at this point in the history
Release 0.4.8
  • Loading branch information
mboudet authored Oct 20, 2023
2 parents 31a109a + f575f82 commit b8f0ebf
Show file tree
Hide file tree
Showing 70 changed files with 2,701 additions and 6,113 deletions.
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)

## [0.4.8] 2023-10-20

### Added

- Option for redirecting the search to an external url ("public.redirectSearch" key in config)
- An additional key "public.redirectSearchAttribute", defaulting to 'query', will be used as the get parameter attribute. (ie: url + "?redirectSearchAttribute=query")
- Options for using a remote search ending, and merging the results with GNB internal search.
- The 'public.externalSearch' option need to be set to true, and an 'externalSearchOptions' dict need to be set.
- 'url' key is the remote endpoint where the query will be sent
- 'gene_field' is the remote field to get the gene IDs (default to geneId)
- 'query_param' : optional get parameter to use for the query
- 'field_param': optional get parameter to use to restrict the results to the gene_field value
- 'count_param': optional get parameter to restrict the number of results
- Multiple annotations for the same genome
- When adding an annotation, you must now set the '--annot' to set the annotation name.
- When integrating data afterward, you can use the --annot tag to specify the annotation you are aiming for.
- If you have multiple genes with the same ID, and do not specify '--annot', the results may be variables
- You can specify --annotations multiple time when integrating orthogroups
- Will now decode proteins and genes IDs when integrating data. (It was already done when integrating gffs, so there was some mismatch with IDs)

## Changed

- Various UI fixes to better fit multiple annotation versions
- Including an 'annotation' selector in the gene list

## [0.4.7] 2023-09-26

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

67 changes: 58 additions & 9 deletions cli/genoboo.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,14 @@ addAnnotation
.arguments('<file>')
.option('-u, --username <username>', 'GeneNoteBook admin username')
.option('-p, --password <password>', 'GeneNoteBook admin password')
.option(
.requiredOption(
'-n, --name <genome-name>',
'Reference genome name to which the annotation should be added.',
)
.requiredOption(
'--annot <annotation-name>',
'Annotation name',
)
.option(
'-r, --re_protein <pattern>',
'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)',
Expand Down Expand Up @@ -352,6 +356,7 @@ addAnnotation
password,
port = 3000,
name,
annot,
re_protein,
re_protein_capture,
attr_protein,
Expand Down Expand Up @@ -389,6 +394,7 @@ addAnnotation
{
fileName,
genomeName: name,
annotationName: annot,
re_protein,
re_protein_capture: correctProteinCapture,
attr_protein,
Expand Down Expand Up @@ -433,6 +439,10 @@ running GeneNoteBook server.`
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'-fmt, --format [parser]',
`Choose a parser for the diamond output format. Parses .xml, .txt
Expand All @@ -455,7 +465,7 @@ running GeneNoteBook server.`
.action(
(
file,
{ username, password, port = 3000, format, algorithm, matrix, database }
{ username, password, port = 3000, annot, format, algorithm, matrix, database }
) => {
if (typeof file !== 'string') addDiamond.help();

Expand Down Expand Up @@ -490,6 +500,7 @@ file extension is not "xml", "txt"`);
fileName,
parser: parserType,
program: 'diamond',
annot: annot,
algorithm: algorithm,
matrix: matrix,
database: database,
Expand All @@ -502,7 +513,7 @@ file extension is not "xml", "txt"`);
Example:
genenotebook add diamond mmucedo.xml -u admin -p admin
or
genenotebook add diamond mmucedo.txt --format txt --program blastp --matrix BLOSUM90 -db "Non-reundant protein sequences (nr)" -u admin -p admin
genenotebook add diamond mmucedo.txt --format txt --matrix BLOSUM90 -db "Non-reundant protein sequences (nr)" -u admin -p admin
`);
})
.exitOverride(customExitOverride(addDiamond));
Expand All @@ -525,6 +536,10 @@ running GeneNoteBook server.`
'-p, --password <adminPassword>',
'GeneNoteBook admin password'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
Expand All @@ -548,7 +563,7 @@ running GeneNoteBook server.`
.action(
(
file,
{ username, password, port = 3000, format, algorithm, matrix, database }
{ username, password, port = 3000, annot, format, algorithm, matrix, database }
) => {
if (typeof file !== 'string') addBlast.help();

Expand Down Expand Up @@ -584,6 +599,7 @@ file extension is not "xml", "txt"`);
parser: parserType,
program: 'blast',
algorithm: algorithm,
annot: annot,
matrix: matrix,
database: database,
}
Expand Down Expand Up @@ -619,6 +635,10 @@ addExpression
'-d, --sample-description <description>',
'Description of the experiment'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'-r, --replicas <replicas...>',
'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'
Expand All @@ -639,7 +659,7 @@ addExpression
const replicas = opts.replicas || [];
const replicaNames = opts.replicaNames || [];
const isPublic = opts.public;

const annot = opts.annot
if (!(fileName && username && password)) {
program.help();
}
Expand All @@ -648,6 +668,7 @@ addExpression
{
fileName,
description,
annot,
replicas,
replicaNames,
isPublic
Expand Down Expand Up @@ -680,6 +701,10 @@ addExpression
'-d, --sample-description <description>',
'Description of the experiment'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'--public',
'Set the generated replica groups as public. Default: false',
Expand All @@ -692,6 +717,7 @@ addExpression
const replicaGroup = opts.replicaGroup || fileName;
const description = opts.sampleDescription || 'description';
const isPublic = opts.public
const anot = opts.annot

if (!(fileName && username && password)) {
program.help();
Expand All @@ -701,6 +727,7 @@ addExpression
{
fileName,
sampleName,
annot: annot,
replicaGroup,
description,
isPublic
Expand Down Expand Up @@ -728,12 +755,16 @@ addInterproscan
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'--format [parser]',
`Choose a parser for the interproscan output files. Parses .gff3 and .tsv
extensions.`
)
.action((file, { username, password, port = 3000, format }) => {
.action((file, { username, password, port = 3000, format, annot }) => {
if (typeof file !== 'string') addInterproscan.help();

const fileName = path.resolve(file);
Expand Down Expand Up @@ -766,6 +797,7 @@ file extension is not "tsv", "gff3" or "xml".`);
{
fileName,
parser: parserType,
annot: annot
}
);
})
Expand Down Expand Up @@ -794,11 +826,15 @@ addEggnog
'-p, --password <adminPassword>',
'GeneNoteBook admin password'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
)
.action((file, { username, password, port = 3000 }) => {
.action((file, { username, password, port = 3000, annot }) => {
if (typeof file !== 'string') addEggnog.help();

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

new GeneNoteBookConnection({ username, password, port }).call('addEggnog', {
fileName,
annot: annot
});
})
.on('--help', () => {
Expand All @@ -833,11 +870,15 @@ addHectar
'-p, --password <adminPassword>',
'GeneNoteBook admin password'
)
.option(
'--annot <annotation-ame>',
'Annotation name',
)
.option(
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
)
.action((file, { username, password, port = 3000 }) => {
.action((file, { username, password, port = 3000, annot }) => {
if (typeof file !== 'string') addHectar.help();

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

new GeneNoteBookConnection({ username, password, port }).call('addHectar', {
fileName,
annot: annot
});
})
.on('--help', () => {
Expand Down Expand Up @@ -878,17 +920,23 @@ addOrthogroups
'-f, --force [force]',
'Ignore the use of prefixes.',
)
.option(
'-a, --annotations <annotations...>',
'Name of the annotation to use for gene matching. Can be set multiple times'
)
.requiredOption('-u, --username <username>', 'GeneNoteBook admin username')
.requiredOption('-p, --password <password>', 'GeneNoteBook admin password')
.option(
'--port [port]',
'Port on which GeneNoteBook is running. Default: 3000'
)
.action((file, { prefixe, list, force, username, password, port = 3000 }) => {
.action((file, { prefixe, list, force, annotations, username, password, port = 3000 }) => {
if (typeof file !== 'string') addOrthogroups.help();
const folderName = path.resolve(file);
const prefixes = (typeof list !== 'undefined' ? list : path.resolve(prefixe));

annotations = annotations || []

if (!(folderName && username && password)) {
addOrthogroups.help();
}
Expand All @@ -899,6 +947,7 @@ addOrthogroups
folderName,
force,
prefixes,
annotations
},
);
})
Expand Down
12 changes: 11 additions & 1 deletion config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
"disable_user_login": false,
"disable_user_registration": false,
"blast_link": "",
"expression_unit": "My unit"
"expression_unit": "My unit",
"externalSearch": false,
"redirectSearch": "",
"redirectSearchAttribute": ""
},
"externalSearchOptions": {
"url": "http://0.0.0.0:80",
"gene_field": "gene_id",
"query_param": "q",
"field_param": "display_fields",
"count_param": "max_results"
}
}
1 change: 0 additions & 1 deletion imports/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import './genomes/removeGenome.js';
import './genomes/annotation/removeAnnotationTrack.js';
import './genomes/annotation/addAnnotation.js';

import './genes/interproscan.js';
import './genes/addInterproscan.js';
import './genes/eggnog/addEggnog.js';
import './genes/hectar/addHectar.js';
Expand Down
Loading

0 comments on commit b8f0ebf

Please sign in to comment.