Skip to content

Commit 3ed4f8f

Browse files
committed
Allow snpEff to process genbank files
1 parent 60022a3 commit 3ed4f8f

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/field/GenomeFileSelectorField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Ext4.define('SequenceAnalysis.field.GenomeFileSelectorField', {
2626
load: function(store){
2727
if (this.extensions) {
2828
Ext4.Array.forEach(store.getRange(), function (r) {
29-
if (this.extensions.indexOf(r.get('fileid/FileExtension')) == -1){
29+
if (this.extensions.indexOf(r.get('fileid/FileExtension')) === -1){
3030
store.remove(r);
3131
}
3232
}, this);
@@ -50,7 +50,7 @@ Ext4.define('SequenceAnalysis.field.GenomeFileSelectorField', {
5050
}
5151
}
5252
else if (parent.libraryIds){
53-
if (parent.libraryIds.length == 1){
53+
if (parent.libraryIds.length === 1){
5454
this.updateStoreFilters(parent.libraryIds[0]);
5555
}
5656
else if (!parent.libraryIds.length){

SequenceAnalysis/resources/web/SequenceAnalysis/window/ImportTrackWindow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Ext4.define('SequenceAnalysis.window.ImportTrackWindow', {
5151
name: 'track',
5252
allowBlank: false,
5353
validator: function(){
54-
var matcher = /^.*\.(bed|gff|gff3|gtf|vcf|bigwig|bw)$/i;
55-
return matcher.test(this.getValue()) ? true : 'File must be either: .bed, .gff, .gff3, .gtf, .vcf, .bigwig, or .bw';
54+
var matcher = /^.*\.(bed|gff|gff3|gtf|vcf|bigwig|bw|gbk)$/i;
55+
return matcher.test(this.getValue()) ? true : 'File must be either: .bed, .gff, .gff3, .gtf, .gbk, .vcf, .bigwig, or .bw';
5656
}
5757
},{
5858
xtype: 'textfield',

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/LofreqAnalysis.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public Provider()
9696
super("LofreqAnalysis", "LoFreq Analysis", null, "This will run LowFreq, a tool designed to call low-frequency mutations in a sample, such as viral populations or bacteria. It is recommended to run GATK's BQSR and IndelRealigner upstream of this tool.", Arrays.asList(
9797
ToolParameterDescriptor.createExpDataParam(SNPEffStep.GENE_PARAM, "Gene File", "This is the ID of a GTF or GFF3 file containing genes from this genome.", "sequenceanalysis-genomefileselectorfield", new JSONObject()
9898
{{
99-
put("extensions", Arrays.asList("gtf", "gff"));
99+
put("extensions", Arrays.asList("gtf", "gff", "gbk"));
100100
put("width", 400);
101101
put("allowBlank", false);
102102
}}, null),

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/MergeLoFreqVcfHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public MergeLoFreqVcfHandler()
9191
}}, 25),
9292
ToolParameterDescriptor.createExpDataParam(SNPEffStep.GENE_PARAM, "Gene File", "This is the ID of a GTF or GFF3 file containing genes from this genome.", "sequenceanalysis-genomefileselectorfield", new JSONObject()
9393
{{
94-
put("extensions", Arrays.asList("gtf", "gff"));
94+
put("extensions", Arrays.asList("gtf", "gff", "gbk"));
9595
put("width", 400);
9696
put("allowBlank", false);
9797
}}, null)

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/variant/SnpEffWrapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ else if ("gff".equalsIgnoreCase(ext))
127127
{
128128
params.add("-gff3");
129129
}
130+
else if ("gbk".equalsIgnoreCase(ext))
131+
{
132+
params.add("-genbank");
133+
}
130134
else
131135
{
132136
throw new PipelineJobException("unable to process extension: " + ext);

SequenceAnalysis/src/org/labkey/sequenceanalysis/util/SequenceUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public static enum FILETYPE
8181
sff(".sff"),
8282
gtf(".gtf"),
8383
gff(Arrays.asList(".gff", ".gff3"), false),
84+
gbk(".gbk"),
8485
bed(".bed"),
8586
vcf(Arrays.asList(".vcf"), true),
8687
gvcf(Arrays.asList(".g.vcf"), true);

0 commit comments

Comments
 (0)