public ActionResult CreateBamFile(BamSlicingParams pars) { Response.BufferOutput = false; Response.ContentType = "application/octet-stream"; var _extension = pars.SamOutput ? "sam" : "bam"; Response.AddHeader("Content-Disposition", "attachment; filename=" + pars.ReadsetName + "_CHR" + pars.ChrNum + "_" + pars.ChrStartPos + "_" + pars.ChrEndPos + "." + _extension); serverWorker.WriteReads(pars.ReadsetId, pars.ChrNum, pars.ChrStartPos, pars.ChrEndPos, delegate(IList <Read> list) { new SamBamWriter(pars.SamOutput).Write(list, Response.OutputStream); Response.OutputStream.Flush(); }); return(null); }
public void WriteReads(string readsetId, string chr, ulong pos1, ulong pos2, Action <IList <Read> > s) { impl.WriteReads(readsetId, chr, pos1, pos2, s); }