Support comma-separated list of files as input#10
Support comma-separated list of files as input#10yarong-lifemap wants to merge 1 commit intomolstar:masterfrom
Conversation
|
@arose @JonStargaryen @bioinsilico @buzzcrackle any progress with this? the PR looks good |
dsehnal
left a comment
There was a problem hiding this comment.
Sorry this flew under the radar.
| files.forEach(async file => { | ||
| await renderFile(file); | ||
| }); |
There was a problem hiding this comment.
| files.forEach(async file => { | |
| await renderFile(file); | |
| }); | |
| for (const file in files) { | |
| await renderFile(file); | |
| }); |
Need a normal loop here so the await does what it's supposed to. What you did would execute all the renders in parallel which you don't really want as this is a single threaded environment and you would also likely run out of memory if the input list was really long.
| }); | ||
| } | ||
|
|
||
| async function renderFile(filePath: string) { |
There was a problem hiding this comment.
| async function renderFile(filePath: string) { | |
| async function renderFile(filePath: string, renderer: ImageRenderer) { |
and declare const renderer = new ImageRenderer(args.width, args.height, args.format, args.plddt, new FocusFirstResidue()); in the main function. This will reuse the renderer for all the renders and should work out of the box sinde the render function always calls this.canvas3d.clear(); at the end.
|
@arose @JonStargaryen @bioinsilico @buzzcrackle can you please revisit this? |
No description provided.