@@ -65,7 +65,7 @@ const bulkSubmissionMonitor = async () => {
65
65
let submission = { } ;
66
66
let dataSource = cols [ 2 ] ? cols [ 2 ] . trim ( ) : 'Uploaded File' ;
67
67
currRow ++ ;
68
- if ( cols . length < 6 ) {
68
+ if ( cols . length < 5 ) {
69
69
validInput = false ;
70
70
errMsg += `ERROR: Row ${ currRow } : Invalid input.\n` ;
71
71
continue ;
@@ -79,20 +79,20 @@ const bulkSubmissionMonitor = async () => {
79
79
submission [ 'proj_desc' ] = cols [ 1 ] ;
80
80
}
81
81
//get Sequencing Platform, default is Illumina
82
- if ( cols [ 6 ] && cols [ 6 ] === 'PacBio' ) {
82
+ if ( cols [ 3 ] && cols [ 3 ] === 'PacBio' ) {
83
83
submission [ 'platform' ] = 'PacBio' ;
84
84
submission [ 'shortRead' ] = false ;
85
85
} else {
86
86
submission [ 'platform' ] = 'Illumina' ;
87
87
submission [ 'shortRead' ] = true ;
88
88
}
89
89
90
- if ( cols [ 3 ] && cols [ 3 ] . trim ( ) ) {
90
+ if ( cols [ 4 ] && cols [ 4 ] . trim ( ) ) {
91
91
// validate Interleaved or Single-end Illumina/PacBio fastq and ignore the Illumina Pair-1/paire-2
92
92
submission [ 'interleaved' ] = true ;
93
93
let fastqs = [ ] ;
94
94
let fastqs_display = [ ] ;
95
- const fqs = cols [ 3 ] . split ( / , / ) ;
95
+ const fqs = cols [ 4 ] . split ( / , / ) ;
96
96
for ( fq of fqs ) {
97
97
fq = fq . trim ( ) ;
98
98
if ( dataSource === 'HTTP(s) URL' ) {
@@ -106,14 +106,14 @@ const bulkSubmissionMonitor = async () => {
106
106
fastqs_display . push ( `sradata/${ accession } /${ fq } ` ) ;
107
107
} else {
108
108
validInput = false ;
109
- errMsg += `ERROR: Row ${ currRow } : Interleaved or Single-end Illumina/PacBio FASTQ ${ fq } not found.\n` ;
109
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Interleaved or Single-end Illumina/PacBio FASTQ: ${ fq } not found.\n` ;
110
110
}
111
111
} else {
112
112
// it's uploaded file
113
113
const file = await Upload . findOne ( { name : { $eq : fq } , status : { $ne : 'delete' } } ) ;
114
114
if ( ! file ) {
115
115
validInput = false ;
116
- errMsg += `ERROR: Row ${ currRow } : Interleaved or Single-end Illumina/PacBio FASTQ ${ fq } not found.\n` ;
116
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Interleaved or Single-end Illumina/PacBio FASTQ: ${ fq } not found.\n` ;
117
117
} else {
118
118
fastqs . push ( `${ config . IO . UPLOADED_FILES_DIR } /${ file . code } ` ) ;
119
119
fastqs_display . push ( `uploads/${ file . owner } /${ fq } ` ) ;
@@ -135,11 +135,11 @@ const bulkSubmissionMonitor = async () => {
135
135
let fq1s = null ;
136
136
let fq2s = null ;
137
137
// validate the Illumina Pair-1/paire-2
138
- if ( ! ( cols [ 4 ] && cols [ 4 ] . trim ( ) ) ) {
138
+ if ( ! ( cols [ 5 ] && cols [ 5 ] . trim ( ) ) ) {
139
139
validInput = false ;
140
140
errMsg += `ERROR: Row ${ currRow } : Illumina Paired-end R1 required.\n` ;
141
141
} else {
142
- fq1s = cols [ 4 ] . split ( / , / ) ;
142
+ fq1s = cols [ 5 ] . split ( / , / ) ;
143
143
for ( fq of fq1s ) {
144
144
fq = fq . trim ( ) ;
145
145
if ( dataSource === 'HTTP(s) URL' ) {
@@ -153,14 +153,14 @@ const bulkSubmissionMonitor = async () => {
153
153
pairFq1_display . push ( `sradata/${ accession } /${ fq } ` ) ;
154
154
} else {
155
155
validInput = false ;
156
- errMsg += `ERROR: Row ${ currRow } : Interleaved or Single -end Illumina/PacBio FASTQ ${ fq } not found.\n` ;
156
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Illumina Paired -end R1 FASTQ: ${ fq } not found.\n` ;
157
157
}
158
158
} else {
159
159
// it's uploaded file
160
160
const file = await Upload . findOne ( { name : { $eq : fq } , status : { $ne : 'delete' } } ) ;
161
161
if ( ! file ) {
162
162
validInput = false ;
163
- errMsg += `ERROR: Row ${ currRow } : Illumina Paired-end R1 ${ fq } not found.\n` ;
163
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Illumina Paired-end R1 FASTQ: ${ fq } not found.\n` ;
164
164
} else {
165
165
pairFq1 . push ( `${ config . IO . UPLOADED_FILES_DIR } /${ file . code } ` ) ;
166
166
pairFq1_display . push ( `uploads/${ file . owner } /${ fq } ` ) ;
@@ -169,11 +169,11 @@ const bulkSubmissionMonitor = async () => {
169
169
} ;
170
170
}
171
171
172
- if ( ! ( cols [ 5 ] && cols [ 5 ] . trim ( ) ) ) {
172
+ if ( ! ( cols [ 6 ] && cols [ 6 ] . trim ( ) ) ) {
173
173
validInput = false ;
174
174
errMsg += `ERROR: Row ${ currRow } : Illumina Paired-end R2 required.\n` ;
175
175
} else {
176
- fq2s = cols [ 5 ] . split ( / , / ) ;
176
+ fq2s = cols [ 6 ] . split ( / , / ) ;
177
177
for ( fq of fq2s ) {
178
178
fq = fq . trim ( ) ;
179
179
if ( dataSource === 'HTTP(s) URL' ) {
@@ -187,14 +187,14 @@ const bulkSubmissionMonitor = async () => {
187
187
pairFq2_display . push ( `sradata/${ accession } /${ fq } ` ) ;
188
188
} else {
189
189
validInput = false ;
190
- errMsg += `ERROR: Row ${ currRow } : Interleaved or Single -end Illumina/PacBio FASTQ ${ fq } not found.\n` ;
190
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Illumina Paired -end R2 FASTQ: ${ fq } not found.\n` ;
191
191
}
192
192
} else {
193
193
// it's uploaded file
194
194
const file = await Upload . findOne ( { name : { $eq : fq } , status : { $ne : 'delete' } } ) ;
195
195
if ( ! file ) {
196
196
validInput = false ;
197
- errMsg += `ERROR: Row ${ currRow } : Illumina Paired-end R2 ${ fq } not found.\n` ;
197
+ errMsg += `ERROR: Row ${ currRow } : ${ dataSource } : Illumina Paired-end R2 FASTQ: ${ fq } not found.\n` ;
198
198
} else {
199
199
pairFq2 . push ( `${ config . IO . UPLOADED_FILES_DIR } /${ file . code } ` ) ;
200
200
pairFq2_display . push ( `uploads/${ file . owner } /${ fq } ` ) ;
@@ -224,7 +224,7 @@ const bulkSubmissionMonitor = async () => {
224
224
// submit projects
225
225
const workflowSettings = { ...workflowlist , ...pipelinelist } ;
226
226
let projects = [ ] ;
227
-
227
+ let submission = null ;
228
228
for ( submission of submissions ) {
229
229
//console.log(submission)
230
230
let code = randomize ( 'Aa0' , 16 ) ;
0 commit comments