Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify file path without input file html tag #8

Open
abbioinfo opened this issue Jul 26, 2020 · 1 comment
Open

specify file path without input file html tag #8

abbioinfo opened this issue Jul 26, 2020 · 1 comment

Comments

@abbioinfo
Copy link

Hi Developer,
I am working on building a web server in which I have to generate a blast output and show it to users. The "blasterjs" can help in visualizing my output, but currently it requires user to submit BLAST output via <Input Type="file> tag. Is there any way, I can directly specify the BLAST output file path to JS, without the need of <Input Type="file>

Thank you

@P3df4r
Copy link

P3df4r commented Oct 25, 2023

Hi @abbioinfo ,

I stay in same problem, but i can generate the blasterjs output without input file from the user.

In documentation the BlasterJS, the code for this:

...
<script type="text/javascript">
    var alignments = "...";
       
    var blasterjs = require("biojs-vis-blasterjs");
    var instance  = new blasterjs({
        string: alignments,
        multipleAlignments: "blast-multiple-alignments",
        alignmentsTable: "blast-alignments-table",
        singleAlignment: "blast-single-alignment"
    });    
</script>

But, the file from var alignment dont specificed (i had problems with line breaks, despite only referencing the file without alignments). For resolved the problem, i returned the blast result in variable with outfmt="0" (in python) and referencied in js with format "blast_output". The return is read in blasterjs, but dont view the results with alignments.

My code:

<script type="text/javascript">
    var alignments = `{{blast_output}}`;
    var blasterjs = require("biojs-vis-blasterjs");
    var instance  = new blasterjs({
        string: alignments,
        multipleAlignments: "blast-multiple-alignments",
        alignmentsTable: "blast-alignments-table",
        singleAlignment: "blast-single-alignment"
    });
</script>

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants