6815 |
26 Aug 22 |
nicklas |
var Hisat = function() |
6815 |
26 Aug 22 |
nicklas |
2 |
{ |
6815 |
26 Aug 22 |
nicklas |
var hisat = {}; |
6815 |
26 Aug 22 |
nicklas |
var debug = 0; |
6815 |
26 Aug 22 |
nicklas |
5 |
|
6815 |
26 Aug 22 |
nicklas |
var JOB_IMAGE = { 'DONE': 'ok.png', 'ERROR': 'error.png'}; |
6815 |
26 Aug 22 |
nicklas |
7 |
|
6815 |
26 Aug 22 |
nicklas |
var alignedSequences; |
6815 |
26 Aug 22 |
nicklas |
9 |
|
6815 |
26 Aug 22 |
nicklas |
// Page initialization |
6815 |
26 Aug 22 |
nicklas |
hisat.initPage = function() |
6815 |
26 Aug 22 |
nicklas |
12 |
{ |
6815 |
26 Aug 22 |
nicklas |
13 |
|
6815 |
26 Aug 22 |
nicklas |
// Step 1 |
6815 |
26 Aug 22 |
nicklas |
15 |
|
6815 |
26 Aug 22 |
nicklas |
// Navigation |
6815 |
26 Aug 22 |
nicklas |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
6815 |
26 Aug 22 |
nicklas |
Buttons.addClickHandler('gorestart', Wizard.restartWizard); |
6815 |
26 Aug 22 |
nicklas |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
6815 |
26 Aug 22 |
nicklas |
Buttons.addClickHandler('goregister', Wizard.goRegister); |
6815 |
26 Aug 22 |
nicklas |
21 |
|
6815 |
26 Aug 22 |
nicklas |
// Final registration |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler('wizard', 'wizard-submit', hisat.submit); |
6815 |
26 Aug 22 |
nicklas |
24 |
|
6815 |
26 Aug 22 |
nicklas |
Wizard.showLoadingAnimation('Loading bioassays...'); |
6815 |
26 Aug 22 |
nicklas |
var url = '../Hisat2023.servlet?ID='+App.getSessionId(); |
6815 |
26 Aug 22 |
nicklas |
url += '&cmd=GetUnconfirmedAlignedSequences'; |
6815 |
26 Aug 22 |
nicklas |
Wizard.asyncJsonRequest(url, hisat.initializeStep1); |
6815 |
26 Aug 22 |
nicklas |
29 |
} |
6815 |
26 Aug 22 |
nicklas |
30 |
|
6815 |
26 Aug 22 |
nicklas |
// --- Step 1 ----------------------------------- |
6815 |
26 Aug 22 |
nicklas |
hisat.initializeStep1 = function(response) |
6815 |
26 Aug 22 |
nicklas |
33 |
{ |
6815 |
26 Aug 22 |
nicklas |
alignedSequences = response.alignedSequences; |
6815 |
26 Aug 22 |
nicklas |
if (alignedSequences.length == 0) |
6815 |
26 Aug 22 |
nicklas |
36 |
{ |
6815 |
26 Aug 22 |
nicklas |
Wizard.setFatalError('No aligned sequences available for processing.'); |
6815 |
26 Aug 22 |
nicklas |
return; |
6815 |
26 Aug 22 |
nicklas |
39 |
} |
6815 |
26 Aug 22 |
nicklas |
40 |
|
6815 |
26 Aug 22 |
nicklas |
var html = '<table id="alignedSequencesTable">'; |
6815 |
26 Aug 22 |
nicklas |
html += '<thead class="bg-filled-100">'; |
6815 |
26 Aug 22 |
nicklas |
// Header row |
6815 |
26 Aug 22 |
nicklas |
html += '<tr>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft" colspan="6">Reads (millions)</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft" colspan="3">Genotypes QC</th>' |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft" colspan="3">Actions</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">Comment</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</tr>'; |
6815 |
26 Aug 22 |
nicklas |
54 |
|
6815 |
26 Aug 22 |
nicklas |
html += '<tr>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>Library</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">Plate</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">PF_READS</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>PT_READS</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>PM_READS</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>ALIGNED_PAIRS</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="icon-col"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>Duplicates</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">Count</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th>HET</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="icon-col"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">Job</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft">Files</th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft"><span id="flagrna" data-prefix="flag" class="interactable link" title="Toggle selection – use CTRL, ALT or SHIFT to clear">Flag RNA</span></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th><span id="realign" data-prefix="realign" class="interactable link" title="Toggle selection – use CTRL, ALT or SHIFT to clear">Re-align</span></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th><span id="stringtie" data-prefix="stringtie" class="interactable link" title="Toggle selection – use CTRL, ALT or SHIFT to clear">StringTie</span></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<th class="dottedleft"></th>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</tr>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</thead>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<tbody>'; |
6815 |
26 Aug 22 |
nicklas |
var numWithError = 0; |
6815 |
26 Aug 22 |
nicklas |
var yellowImg = '<img src="../images/yellow-label.png">'; |
6815 |
26 Aug 22 |
nicklas |
for (var alignedNo = 0; alignedNo < alignedSequences.length; alignedNo++) |
6815 |
26 Aug 22 |
nicklas |
79 |
{ |
6815 |
26 Aug 22 |
nicklas |
var aligned = alignedSequences[alignedNo]; |
6815 |
26 Aug 22 |
nicklas |
81 |
|
6815 |
26 Aug 22 |
nicklas |
var lib = aligned.lib; |
6815 |
26 Aug 22 |
nicklas |
lib.stratagene = Reggie.isStratagene(lib.name); |
6815 |
26 Aug 22 |
nicklas |
lib.external = Reggie.isExternal(lib.name); |
6815 |
26 Aug 22 |
nicklas |
var isYellow = lib.specimen && lib.specimen.YellowLabel != null; |
6815 |
26 Aug 22 |
nicklas |
var img = isYellow ? yellowImg : ''; |
6815 |
26 Aug 22 |
nicklas |
87 |
|
6815 |
26 Aug 22 |
nicklas |
var libPlate = lib.bioWell ? lib.bioWell.bioPlate : null; |
6815 |
26 Aug 22 |
nicklas |
89 |
|
6815 |
26 Aug 22 |
nicklas |
var merged = aligned.merged; |
6815 |
26 Aug 22 |
nicklas |
var masked = aligned.masked; |
6815 |
26 Aug 22 |
nicklas |
92 |
|
6815 |
26 Aug 22 |
nicklas |
var pfReads = merged.PF_READS == null ? '-' : Reggie.formatNumber(merged.PF_READS/1000000, null, 2) |
6815 |
26 Aug 22 |
nicklas |
var ptReads = merged.PT_READS == null ? '-' : Reggie.formatNumber(merged.PT_READS/1000000, null, 2) |
6815 |
26 Aug 22 |
nicklas |
var maskedReads = masked.PM_READS == null ? '-' : Reggie.formatNumber(masked.PM_READS/1000000, null, 2) |
6815 |
26 Aug 22 |
nicklas |
var alignedReads = aligned.ALIGNED_PAIRS == null ? '-' : Reggie.formatNumber(aligned.ALIGNED_PAIRS/1000000, null, 2); |
6815 |
26 Aug 22 |
nicklas |
var ptPercent = merged.PF_READS && merged.PT_READS ? ' (' + Math.round(100*merged.PT_READS/merged.PF_READS) + '%)' : ''; |
6815 |
26 Aug 22 |
nicklas |
var alignedPercent = aligned.ALIGNED_PAIRS && merged.PF_READS ? ' (' + Math.round(100*aligned.ALIGNED_PAIRS/merged.PF_READS) + '%)' : ''; |
6815 |
26 Aug 22 |
nicklas |
var percentDuplicates = aligned.FRACTION_DUPLICATION == null ? '-' : Math.round(100*aligned.FRACTION_DUPLICATION)+'%'; |
6815 |
26 Aug 22 |
nicklas |
var genotypeCount = aligned.QC_GENOTYPE_COUNT || '-'; |
6815 |
26 Aug 22 |
nicklas |
var hetPct = aligned.QC_GENOTYPE_HET_PCT == null ? '' : Math.round(aligned.QC_GENOTYPE_HET_PCT)+'%'; |
6815 |
26 Aug 22 |
nicklas |
var job = aligned.job; |
6815 |
26 Aug 22 |
nicklas |
var limits = job.limits; |
6815 |
26 Aug 22 |
nicklas |
104 |
|
6815 |
26 Aug 22 |
nicklas |
var flag = null; |
6815 |
26 Aug 22 |
nicklas |
var isError = job.status == 'ERROR'; |
6815 |
26 Aug 22 |
nicklas |
var stringTieChecked = aligned.ALIGNED_PAIRS != null && aligned.ALIGNED_PAIRS > limits.minAlignedPairsStop; |
6815 |
26 Aug 22 |
nicklas |
108 |
|
6815 |
26 Aug 22 |
nicklas |
html += '<tr class="highlight ' + (alignedNo % 4 < 2 ? 'evenrow' : 'oddrow') + (isYellow ? ' yellow-specimen' : '') + '">'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="prompt if-yellow">'+img+aligned.name+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">'+(libPlate ? Strings.encodeTags(libPlate.name) : '-')+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">'+pfReads+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td>'+ptReads+ptPercent+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td>'+maskedReads+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td>'+alignedReads+alignedPercent+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="icon-col">'; |
6815 |
26 Aug 22 |
nicklas |
if (aligned.ALIGNED_PAIRS != null && aligned.ALIGNED_PAIRS < limits.minAlignedPairsFlag) |
6815 |
26 Aug 22 |
nicklas |
118 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<img src="../images/warning.png" title="Less than '+Reggie.formatCount(limits.minAlignedPairsFlag) + ' aligned pairs">'; |
6815 |
26 Aug 22 |
nicklas |
flag = 'AlignFailed'; |
6815 |
26 Aug 22 |
nicklas |
121 |
} |
6815 |
26 Aug 22 |
nicklas |
html += '</td>'; |
6815 |
26 Aug 22 |
nicklas |
123 |
|
6815 |
26 Aug 22 |
nicklas |
html += '<td>'+percentDuplicates+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">'+genotypeCount+'</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td>'+hetPct; |
6815 |
26 Aug 22 |
nicklas |
if (aligned.QC_GENOTYPE_HET_PCT == null) |
6815 |
26 Aug 22 |
nicklas |
128 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<img src="../images/warning.png" title="Genotype QC failed">'; |
6815 |
26 Aug 22 |
nicklas |
isError = true; |
6815 |
26 Aug 22 |
nicklas |
131 |
} |
6815 |
26 Aug 22 |
nicklas |
else if (aligned.QC_GENOTYPE_HET_PCT > limits.maxHetPct) |
6815 |
26 Aug 22 |
nicklas |
133 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<img src="../images/warning.png" title="More than '+Reggie.formatCount(limits.maxHetPct) + '% HET may indicate contamination">'; |
6815 |
26 Aug 22 |
nicklas |
if (flag == null) flag = 'HighHET'; |
6815 |
26 Aug 22 |
nicklas |
136 |
} |
6815 |
26 Aug 22 |
nicklas |
html += '</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="icon-col">'; |
6815 |
26 Aug 22 |
nicklas |
if (aligned.qcVcf) |
6815 |
26 Aug 22 |
nicklas |
140 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<span class="link vcf-link" data-file-id="'+aligned.qcVcf.id+'" data-item-id="'+aligned.id+'" title="View VCF statistics"><img src="../images/vcf_file.png"></span>'; |
6815 |
26 Aug 22 |
nicklas |
142 |
} |
6815 |
26 Aug 22 |
nicklas |
html += '</td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">'; |
6815 |
26 Aug 22 |
nicklas |
html += '<span class="link item-link" data-item-type="JOB" data-item-id="'+job.id+'" title="'+Strings.encodeTags(job.statusMessage)+'"><img src="../images/'+JOB_IMAGE[job.status]+'"></span>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</td>'; |
6815 |
26 Aug 22 |
nicklas |
if (aligned.DataFilesFolder && job.server) |
6815 |
26 Aug 22 |
nicklas |
148 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">'; |
6815 |
26 Aug 22 |
nicklas |
html += '<span class="link file-link" data-server="'+Strings.encodeTags(job.server)+'" data-folder="'+Strings.encodeTags(aligned.DataFilesFolder)+'" data-item-id="'+aligned.id+'" title="View generated files"><img src="../images/remote_folder.png"></span>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</td>'; |
6815 |
26 Aug 22 |
nicklas |
152 |
} |
6815 |
26 Aug 22 |
nicklas |
else |
6815 |
26 Aug 22 |
nicklas |
154 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">-</td>'; |
6815 |
26 Aug 22 |
nicklas |
156 |
} |
6815 |
26 Aug 22 |
nicklas |
157 |
|
6815 |
26 Aug 22 |
nicklas |
var realignChecked = isError ? ' checked' : ''; |
6815 |
26 Aug 22 |
nicklas |
var stringTieDisabled = isError ? ' disabled' : ''; |
6815 |
26 Aug 22 |
nicklas |
if (isError) numWithError++; |
6815 |
26 Aug 22 |
nicklas |
if (lib.stratagene || lib.external) |
6815 |
26 Aug 22 |
nicklas |
162 |
{ |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft">-</td>'; |
6815 |
26 Aug 22 |
nicklas |
164 |
} |
6815 |
26 Aug 22 |
nicklas |
else |
6815 |
26 Aug 22 |
nicklas |
166 |
{ |
7123 |
21 Apr 23 |
nicklas |
// We do not automatically check the FLAG option here since the other Hisat pipeline will do this |
7123 |
21 Apr 23 |
nicklas |
// But we allow the operator to flag if needed |
7123 |
21 Apr 23 |
nicklas |
html += '<td class="dottedleft"><input type="checkbox" name="flag.'+aligned.id+'"'+(flag != null ? ' value="'+flag+'"':'')+'></td>'; |
6815 |
26 Aug 22 |
nicklas |
170 |
} |
6815 |
26 Aug 22 |
nicklas |
171 |
|
6815 |
26 Aug 22 |
nicklas |
html += '<td><input type="checkbox" name="realign.'+aligned.id+'"'+realignChecked+'></td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td><input type="checkbox" name="stringtie.'+aligned.id+'"'+stringTieDisabled+(stringTieChecked ? ' checked':'')+'></td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '<td class="dottedleft comment"><input type="text" name="comment.'+aligned.id+'"></td>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</tr>'; |
6815 |
26 Aug 22 |
nicklas |
176 |
|
6815 |
26 Aug 22 |
nicklas |
177 |
} |
6815 |
26 Aug 22 |
nicklas |
html += '</tbody>'; |
6815 |
26 Aug 22 |
nicklas |
html += '</table>'; |
6815 |
26 Aug 22 |
nicklas |
Doc.element('alignedSequences').innerHTML = html; |
6815 |
26 Aug 22 |
nicklas |
if (numWithError > 0) Doc.show('delete-items', 'table'); |
6815 |
26 Aug 22 |
nicklas |
182 |
|
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler('flagrna', 'click', hisat.toggleSelection); |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler('realign', 'click', hisat.toggleSelection); |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler('stringtie', 'click', hisat.toggleSelection); |
6815 |
26 Aug 22 |
nicklas |
186 |
|
6815 |
26 Aug 22 |
nicklas |
// Add click handler to items |
6815 |
26 Aug 22 |
nicklas |
var clickableItems = document.getElementsByClassName('item-link'); |
6815 |
26 Aug 22 |
nicklas |
for (var i = 0; i < clickableItems.length; i++) |
6815 |
26 Aug 22 |
nicklas |
190 |
{ |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler(clickableItems[i], 'click', Items.itemOnClick); |
6815 |
26 Aug 22 |
nicklas |
192 |
} |
6815 |
26 Aug 22 |
nicklas |
193 |
|
6815 |
26 Aug 22 |
nicklas |
// Add click handler to file links |
6815 |
26 Aug 22 |
nicklas |
var clickableItems = document.getElementsByClassName('file-link'); |
6815 |
26 Aug 22 |
nicklas |
for (var i = 0; i < clickableItems.length; i++) |
6815 |
26 Aug 22 |
nicklas |
197 |
{ |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler(clickableItems[i], 'click', hisat.fileLinkOnClick); |
6815 |
26 Aug 22 |
nicklas |
199 |
} |
6815 |
26 Aug 22 |
nicklas |
200 |
|
6815 |
26 Aug 22 |
nicklas |
// Add click handler to VCF files |
6815 |
26 Aug 22 |
nicklas |
var clickableItems = document.getElementsByClassName('vcf-link'); |
6815 |
26 Aug 22 |
nicklas |
for (var i = 0; i < clickableItems.length; i++) |
6815 |
26 Aug 22 |
nicklas |
204 |
{ |
6815 |
26 Aug 22 |
nicklas |
Events.addEventHandler(clickableItems[i], 'click', hisat.vcfLinkOnClick); |
6815 |
26 Aug 22 |
nicklas |
206 |
} |
6815 |
26 Aug 22 |
nicklas |
207 |
|
6815 |
26 Aug 22 |
nicklas |
Doc.show('step-1'); |
6815 |
26 Aug 22 |
nicklas |
Doc.show('goregister'); |
6815 |
26 Aug 22 |
nicklas |
210 |
} |
6815 |
26 Aug 22 |
nicklas |
211 |
|
6815 |
26 Aug 22 |
nicklas |
hisat.fileLinkOnClick = function(event) |
6815 |
26 Aug 22 |
nicklas |
213 |
{ |
6815 |
26 Aug 22 |
nicklas |
var folder = Data.get(event.currentTarget, 'folder'); |
6815 |
26 Aug 22 |
nicklas |
var server = Data.get(event.currentTarget, 'server'); |
6815 |
26 Aug 22 |
nicklas |
var itemId = Data.get(event.currentTarget, 'item-id'); |
6815 |
26 Aug 22 |
nicklas |
server = server.replace(/\s*\[.*\]/, ''); |
6815 |
26 Aug 22 |
nicklas |
var url = 'view_remote_files.jsp?ID=' + App.getSessionId(); |
6815 |
26 Aug 22 |
nicklas |
url += '&clusterId='+server; |
6815 |
26 Aug 22 |
nicklas |
url += '&path='+encodeURIComponent(folder); |
6815 |
26 Aug 22 |
nicklas |
url += '&itemType=DERIVEDBIOASSAY&itemId='+itemId; |
6815 |
26 Aug 22 |
nicklas |
Dialogs.openPopup(url, 'ViewProjectFiles', 750, 500); |
6815 |
26 Aug 22 |
nicklas |
223 |
} |
6815 |
26 Aug 22 |
nicklas |
224 |
|
6815 |
26 Aug 22 |
nicklas |
hisat.vcfLinkOnClick = function(event) |
6815 |
26 Aug 22 |
nicklas |
226 |
{ |
6815 |
26 Aug 22 |
nicklas |
var fileId = Data.int(event.currentTarget, 'file-id'); |
6815 |
26 Aug 22 |
nicklas |
var itemId = Data.get(event.currentTarget, 'item-id'); |
6815 |
26 Aug 22 |
nicklas |
229 |
|
6815 |
26 Aug 22 |
nicklas |
var url = 'view_genotypes.jsp?ID=' + App.getSessionId(); |
6815 |
26 Aug 22 |
nicklas |
url += '&fileId='+fileId; |
6815 |
26 Aug 22 |
nicklas |
url += '&itemId='+itemId; |
6815 |
26 Aug 22 |
nicklas |
Dialogs.openPopup(url, 'ViewVcf', 750, 500); |
6815 |
26 Aug 22 |
nicklas |
234 |
} |
6815 |
26 Aug 22 |
nicklas |
235 |
|
6815 |
26 Aug 22 |
nicklas |
hisat.toggleSelection = function(event) |
6815 |
26 Aug 22 |
nicklas |
237 |
{ |
6815 |
26 Aug 22 |
nicklas |
var prefix = Data.get(event.currentTarget, 'prefix'); |
6815 |
26 Aug 22 |
nicklas |
var specialKey = event.altKey || event.ctrlKey || event.shiftKey; |
6815 |
26 Aug 22 |
nicklas |
240 |
|
6815 |
26 Aug 22 |
nicklas |
var frm = document.forms['reggie']; |
6815 |
26 Aug 22 |
nicklas |
for (var alignedNo = 0; alignedNo < alignedSequences.length; alignedNo++) |
6815 |
26 Aug 22 |
nicklas |
243 |
{ |
6815 |
26 Aug 22 |
nicklas |
var aligned = alignedSequences[alignedNo]; |
6815 |
26 Aug 22 |
nicklas |
var chk = frm[prefix+'.'+aligned.id]; |
6815 |
26 Aug 22 |
nicklas |
if (chk && !chk.disabled) |
6815 |
26 Aug 22 |
nicklas |
247 |
{ |
6815 |
26 Aug 22 |
nicklas |
chk.checked = specialKey ? false : !chk.checked; |
6815 |
26 Aug 22 |
nicklas |
249 |
} |
6815 |
26 Aug 22 |
nicklas |
250 |
} |
6815 |
26 Aug 22 |
nicklas |
251 |
} |
6815 |
26 Aug 22 |
nicklas |
252 |
|
6815 |
26 Aug 22 |
nicklas |
hisat.submit = function() |
6815 |
26 Aug 22 |
nicklas |
254 |
{ |
6815 |
26 Aug 22 |
nicklas |
var frm = document.forms['reggie']; |
6815 |
26 Aug 22 |
nicklas |
var submitInfo = {}; |
6815 |
26 Aug 22 |
nicklas |
submitInfo.deleteItemsCreatedByFailedJobs = frm.deleteItemsCreatedByFailedJobs.checked; |
6815 |
26 Aug 22 |
nicklas |
258 |
|
6815 |
26 Aug 22 |
nicklas |
var all = []; |
6815 |
26 Aug 22 |
nicklas |
submitInfo.alignedSequences = all; |
6815 |
26 Aug 22 |
nicklas |
for (var alignedNo = 0; alignedNo < alignedSequences.length; alignedNo++) |
6815 |
26 Aug 22 |
nicklas |
262 |
{ |
6815 |
26 Aug 22 |
nicklas |
var aligned = alignedSequences[alignedNo]; |
6815 |
26 Aug 22 |
nicklas |
var tmp = {}; |
6815 |
26 Aug 22 |
nicklas |
tmp.id = aligned.id; |
6815 |
26 Aug 22 |
nicklas |
266 |
|
6815 |
26 Aug 22 |
nicklas |
tmp.flag = frm['flag.'+aligned.id] && frm['flag.'+aligned.id].checked ? frm['flag.'+aligned.id].value : null; |
6815 |
26 Aug 22 |
nicklas |
tmp.realign = frm['realign.'+aligned.id].checked; |
6815 |
26 Aug 22 |
nicklas |
tmp.stringtie = frm['stringtie.'+aligned.id].checked; |
6815 |
26 Aug 22 |
nicklas |
tmp.comment = frm['comment.'+aligned.id].value; |
6815 |
26 Aug 22 |
nicklas |
271 |
|
6815 |
26 Aug 22 |
nicklas |
all[all.length] = tmp; |
6815 |
26 Aug 22 |
nicklas |
273 |
} |
7123 |
21 Apr 23 |
nicklas |
274 |
|
6815 |
26 Aug 22 |
nicklas |
var url = '../Hisat2023.servlet?ID='+App.getSessionId(); |
6815 |
26 Aug 22 |
nicklas |
url += '&cmd=RegisterHisat2023Alignment'; |
6815 |
26 Aug 22 |
nicklas |
Wizard.showLoadingAnimation('Performing registration...'); |
6815 |
26 Aug 22 |
nicklas |
Wizard.asyncJsonRequest(url, hisat.submissionResults, 'POST', JSON.stringify(submitInfo)); |
6815 |
26 Aug 22 |
nicklas |
279 |
} |
6815 |
26 Aug 22 |
nicklas |
280 |
|
6815 |
26 Aug 22 |
nicklas |
hisat.submissionResults = function(response) |
6815 |
26 Aug 22 |
nicklas |
282 |
{ |
6815 |
26 Aug 22 |
nicklas |
Wizard.showFinalMessage(response.messages); |
6815 |
26 Aug 22 |
nicklas |
Doc.show('gorestart'); |
6815 |
26 Aug 22 |
nicklas |
285 |
} |
6815 |
26 Aug 22 |
nicklas |
286 |
|
6815 |
26 Aug 22 |
nicklas |
287 |
|
6815 |
26 Aug 22 |
nicklas |
return hisat; |
6815 |
26 Aug 22 |
nicklas |
289 |
}(); |
6815 |
26 Aug 22 |
nicklas |
290 |
|
6815 |
26 Aug 22 |
nicklas |
Doc.onLoad(Hisat.initPage); |
6815 |
26 Aug 22 |
nicklas |
292 |
|