Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - edasilv

Pages: [1]
1
Help for ParamQuery Pro / select dynamic options in toolbar
« on: December 10, 2021, 01:05:11 am »
I have a select on a toolbar with different options of filename that need to be updated after creation, but How to update select text?

I found on documentation something like:  $('#import_file').pqSelect("refreshData");

but before refreshing data, I need to set new data to options. How can I do that?

BEFORE:                                                                                AFTER CREATION

var localFileNames = [{ 'original': 'Original'}]                           var localFileNames = [{ 'original': 'Original', 'custom': 'Custom'}]

{
     type: 'select',
     label: 'Choose file: ',
     attr: 'id="import_file"',
     options: localFileNames.  <-
},

2
Help for ParamQuery Pro / colModel + virtual rendering
« on: November 10, 2021, 10:42:44 am »
My colModel is equivalent but dynamic as my dataModel. Does the virtual rendering just work with fixed colModel list?


3
Exactly I needed colModel. Thanks for your message!
Can I get dynamic data to populate colModel?

I was looking on documentations that you suggested me in another question but I did not find it.
Thanks in advance!

4
No it's not. If you open the table,  you would see that rows and columns are not showing!

5
Hi Paramvir,

here is the example. Please let me know any ideas to make this works!
https://jsfiddle.net/q15pd6g0/5/

Thanks

6
How to get the remaining columns values and row values after hidden columns?
I do not edit or delete cells, rows, and columns, just hidden columns.



7
Thank you for your quick response but I am getting the same error:
It was done as you suggested and the response is coming correctly because is logging as expected but the error keeps going on.

My data model is like the following:

175         dataModel: {
176             location: "remote",
177             cache: true,
178             url: urlResult,
179             getData: function (response) {
180                 console.log('logging response.data' + JSON.stringify(response.data))
181                 return { data: JSON.stringify(response.data) };
182             }
183         },


Any suggestion? Please help :) I have no idea to save the problem!!

My remote response:
{
data: [
{
1: "20472",
Yale New Genes: "",
Gene Ontology: "http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
RefgeneExonLocation: "",
snp135_MultAl: "",
hg19_esp6500siv2_aa: "",
EnsgeneExonFunction: "",
snp135_Frequency: "",
Parents: "",
KnownGeneExonFunction: "",
snp137_common_no_known_medical_impact: "",
Approved Symbol: "IDH1",
Gerp++elem_Pvalue: "",
Interactions: "",
Afalt_1000g2015aug_afr: "",
Hopkins Samples (SNV): "",
OMIM: "https://omim.org/entry/147700",
QualityRMS: "",
ValidForAnnovar: "1",
Hopkins Samples (Indel): "",
RefgeneGeneLocation: "intronic",
ExAC03: "",
ExAC03_EAS: "",
CADD Score: "",
tfbsConsSites: "",
segdup: "",
band: "2q34",
ExAC_r03_pLI: "Name=0.001453708",
Score_Ljb_lrt: "",
CCDS Intolerance Percentile: "55.44939844",
Score_Ljb_mt: "",
OMIM Inheritance: "",
snp137_common: "",
ExAC03_NFE: "",
500 Genes: "",
Score_Ljb_phylop: "",
Mouse Model: "Electrophoretic variation has been shown in tissues of liver, kidney, spleen and muscle. Strains C57BL/6, C3H/He carry the a allele; DBA/2 carries the b allele; M.m. castaneus and M.m. molossinus carry the c allele; the d allele is found at low frequencyin M. m. molossinus in Japan.",
snp132: "",
UW New Genes: "",
AFalt_hg19_cg69: "",
snp137_all: "",
Genotype: "hom",
CCDS Intolerance Score: "0.018483465",
Afalt_1000g2015aug_amr: "",
evofold: "",
KnownGeneGeneName: "IDH1",
ClinVar: "",
VEST_Score: "",
ExAC03_SAS: "",
Status / Expressed Allele: "",
OMIM Phenotypes: "{Glioma, susceptibility to, somatic}",
ExAC03_AMR: "",
snp135_ClinAssoID: "",
Score_Ljb_All: "",
Interaction: "AADAT, ABCF2, ACACB, ACO1, ACO2, ADSL, ALDH5A1, AMD1, ASL, ASS1, CEP57L1, DDA1, DDO, ELAVL1, FH, GLUD1, GLUD2, GMPPB, GOT1, GOT2, HAAO, HSPA5, IDH1, IDH2, IDH3A, IDH3B, IDH3G, IL4I1, MDH2, MTG1, MTHFR, NAGS, NIT2, OGDHL, OTC, PABPC1, PC, PIK3C2A, PKLR, PKM, PRKAG2, PSAT1, PSMD14, RIOK2, RPL10A, RPL4, RPS3A, RPS8, SRR, SUMO4, TARS, TP53I3, TRAPPC3, UBA5, UBA52, UBC, USP7, VAMP7, YWHAZ, ZHX1",
ExAC03_Global: "",
Afalt_1000g2015aug_all: "",
KnownGeneGeneLocation: "intronic",
PubMed: "https://www.ncbi.nlm.nih.gov/pubmed?term=IDH1",
ExAC03_FIN: "",
snp135_Allele: "",
omimgene: "Name=147700",
cosmic68wgs: "",
Score_Ljb_pp2hdiv: "",
Afalt_1000g2015aug_eas: "",
wgEncodeRegTfbsClusteredV3_Score: "",
Gerp++gt2: "",
SiftScore: "",
AFalt_hg19_cg46: "",
hg19_esp6500siv2_all: "",
StartPosition: "209101907",
RefgeneGeneName: "IDH1",
ExAC03_AFR: "",
EnsgeneGeneLocation: "intronic",
snp135_Common: "",
CADDgt20: "",
EndPosition: "209101907",
mce46way: "",
Score_Ljb_pp2hvar: "",
gnomAD_genome_freq: "",
HGMD_2017.2: "",
mirna: "",
wgEncodeRegDnaseClusteredV3_Score: "",
TotalDepth: "50",
UniProt: "http://www.uniprot.org/uniprot/O75874",
Score_Ljb_gerp++: "",
AlternativeAllele: "-",
Expression: "Adipose tissue / Adrenal / Bone marrow / Brain / Breast / Cartilage / Cervix / Colon / Eye / Gi tract / Head n neck / Kidney / Liver / Lung / Nervous / Ovary / Pancreas / Peripheral nerv / Pituitary gland / Placenta / Prostate / Retina / Skin / Spleen / Stomach / Testis / Uterus / Vascular",
gwascatalog: "",
Mammalian Phenotype: "http://www.informatics.jax.org/batch/summary?ids=IDH1&association=MP",
cosmic70: "",
snp129: "",
snp126: "",
OMIM Matching Phenotypes: "",
Afalt_1000g2015aug_sas: "",
fathmm_score: "",
RefgeneExonFunction: "",
EnsgeneExonLocation: "",
Kaviar_AF: "",
Hopkins Total Allele Count (Indel): "46_4598_6",
wgEncodeBroadHmmGm12878HMM_ChromatinStateSegmentation: "Name=10_Txn_Elongation",
GWAS Catalog: "",
ExAC_r03_mis_z: "Name=0.100659045",
gme_AF: "",
Gerp++elem_RSscore: "",
ExAC03_OTH: "",
revel_score: "",
CIDRVar50Mb: "",
ClinVar Variant Classification: "",
vistaEnhancer_ID: "",
miRdSNP: "http://mirdsnp.ccr.buffalo.edu/search.php?filter_gene_name=IDH1",
snp138: "",
EnsgeneGeneName: "ENSG00000138413",
snp135: "",
snp137: "",
snp131: "",
ReferenceAllele: "A",
Hopkins Total Allele Count (SNV): "",
VariantType: "Indel",
KnownGeneExonLocation: "",
dgv: "Name=nsv834517,nsv584297,nsv525747",
WG_GWAVA_score: "",
gnomAD_exome_freq: "",
Afalt_1000g2015aug_eur: "",
snp135_ClinAssoSubmit: "",
VISTA Enhancer: "",
ExAC_r03_gene: "Name=IDH1",
CIDRVar51Mb: "",
WG_EIGEN_score: "",
TraP: "",
hg19_esp6500siv2_ea: "",
simpleRepeat: "",
Quality: "2247559.94",
Chromosome: "2"
},
]
}

8
The data response listed above is for local use.
I've checked that before sending a message.
I did not list the response for remote use, but it needs the response.data (using console log prints correctly the answer) and as I said I get the error shown above.
Any suggestion?


Remote response:
{ data: [{
1: "20472",
Yale New Genes: "",
Gene Ontology: "http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
RefgeneExonLocation: "",
snp135_MultAl: "",
hg19_esp6500siv2_aa: "",
Chromosome: "2"
},
{
1: "20472",
Yale New Genes: "",
Gene Ontology: "http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
RefgeneExonLocation: "",
snp135_MultAl: "",
hg19_esp6500siv2_aa: "",
Chromosome: "2"
},
{
1: "20472",
Yale New Genes: "",
Gene Ontology: "http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
RefgeneExonLocation: "",
snp135_MultAl: "",
hg19_esp6500siv2_aa: "",
Chromosome: "2"
}]}

9
Hi,

I am trying to populate my grid with remote data and I am getting a strange error like the following:

pqgrid.min.js:20 Uncaught TypeError: n.findIndex is not a function
    at pq.cRenderBody.init (pqgrid.min.js:20)
    at t.paramquery.cRefresh.refresh (pqgrid.min.js:12)
    at $.<computed>.<computed>.a.refresh (pqgrid.min.js:10)
    at $.<computed>.<computed>.a.refreshView (pqgrid.min.js:10)
    at $.<computed>.<computed>.i._onDataAvailable (pqgrid.min.js:12)
    at Object.callback (pqgrid.min.js:10)
    at $.<computed>.<computed>.a.onRemoteSuccess (pqgrid.min.js:10)
    at Object.success (pqgrid.min.js:10)
    at fire (jquery-3.4.1.js:3291)
    at Object.fireWith [as resolveWith] (jquery-3.4.1.js:3421)

Did someone experience something similar? Any suggestions?

In order to be sure about my data I've checked it is incorrect but using the same response data locally works fine but using the remote option does not.

The JS code is bellow:

$(document).ready(function(){

    var fileOption = $('#fileOption').data("file")
    var submission = $('#submissionId').data("submission")
    var result = $('#resultId').data("result")
 
    var urlResult = canonicalPhenodbUrl('/analyze/resultItem/' + fileOption + '/' + submission + '/' + result);

    var dataResponse = [
   {
      "1":"20472",
      "Yale New Genes":"rtyueiytegbe",
      "Gene Ontology":"http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
      "RefgeneExonLocation":"",
      "snp135_MultAl":"gdfhsdf",
      "hg19_esp6500siv2_aa":"lorem ipssunc",
      "Chromosome":"2"
   },
   {
      "1":"20472",
      "Yale New Genes":"vbbfbfgd",
      "Gene Ontology":"http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
      "RefgeneExonLocation":"fagutkjtuhrtg",
      "snp135_MultAl":"lorem ispndgf",
      "hg19_esp6500siv2_aa":"dfsadgaf",
      "Chromosome":"2"
   },
   {
      "1":"20472",
      "Yale New Genes":"98067985",
      "Gene Ontology":"http://genecards.org/cgi-bin/carddisp.pl?gene=IDH1&go_proc=1000&rf=/home/genecards/current/website/carddisp.pl#go_proc",
      "RefgeneExonLocation":"htjhyjdj",
      "snp135_MultAl":"lorem ispcdhjgfs",
      "hg19_esp6500siv2_aa":"tjdjtyjrj",
      "Chromosome":"2"
   }
]

    ////////////////////////////////////////////////
    //
    // Result Analysis Grid
    //
    var obj = {
        height:650, width: "flex", hwrap: false, wrap: false,
        scrollModel: { autoFit: false },
        title: "Analysis Result",
        //dataModel: {data: dataResponse},
        dataModel: {
            location: "remote",
            cache: true,
            url: urlResult,
            getData: function (response) {
                let dataResponse = JSON.stringify(response.data)
                console.log(dataResponse)
                return { data: dataResponse };
            }
        },
        flex: { one: true },
        collapsible: {on: false, toggle: true},
        resizable: true,
        menuIcon: true,
        menuUI:{
            tabs: ['hideCols']
        },
        pageModel: { type: "local", rPP: 25, rPPOptions: [10, 25, 50, 100, 500] },
        stateKeys: { groupModel: ['dataIndx', 'collapsed', 'grandSummary', 'nodeClose'] },
        toolbar: {
            cls: 'pq-toolbar-export',
            items: [
                {
                    type: 'button',
                    label: "Export",
                    icon: 'ui-icon-arrowthickstop-1-s',
                    listener: function () {
                            blob = this.exportData({
                                format: 'xlsx',
                                render: true
                            });
                        if(typeof blob === "string"){
                            blob = new Blob([blob]);
                        }

                        saveAs(blob, "analysisResult.xlsx");
                    }
                },
                {
                    type: 'button',
                    label: 'Save State',
                    listener: function () {
                        this.saveState();
                    }
                },
                {
                    type: 'button',
                    label: 'Restore State',
                    listener: function () {
                        //debugger;
                        this.loadState();
                    }
                },
                {
                    type: 'file',
                    attr: 'title="Open xlsx"',
                    attrFile: "accept='.xlsx,.csv'",
                    icon: 'ui-icon-folder-open',
                    label: ' Import File',
                    listener: function( evt ){
                        //import xlsx or csv file via HTML5 file input control.
                        var grid = this,
                            file = evt.target.files[0];//doesn't work in IE9.

                        if(file){
                            grid.showLoading();
                            //import first sheet of xlsx into workbook.
                            pq.excel.importXl( {file: file, sheets:
  • }, function( wb ){


                                //import workbook into grid.
                                grid.importWb({workbook: wb, extraRows: 10, extraCols: 10});
                                grid.hideLoading();
                            })
                        }
                    }
                },
            ]
        },
        create: function () {
            //restore state of grid.
            this.loadState({ refresh: false });
        },
    };

    // Analysis result grid
    var grid = pq.grid("#grid_result", obj)

    grid.on("onload", function () {
        this.saveState();
    })

});




10
Help for ParamQuery Pro / Conflict between jquery and other file?
« on: October 22, 2021, 02:19:15 am »
I am getting the following error, on a specific project that is in production.
Uncaught TypeError: Cannot use 'in' operator to search for 'length' in [ jquery-3.4.1 (3850)

Other 2 project works like a charm, it is the same files but diff behaviour. Any suggestion about that?


11
Help for ParamQuery Pro / Re: Include paramquery into django application
« on: October 22, 2021, 01:58:10 am »
Thank you for your answer!
After your question about grid initialization, I realized that the js file with the grid initialization was not linked to the correct file.





12
Help for ParamQuery Pro / Re: Include paramquery into django application
« on: October 21, 2021, 09:16:38 am »
it shows no error

13
Help for ParamQuery Pro / Include paramquery into django application
« on: October 12, 2021, 03:45:47 am »
{% load static %}
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Django Girls</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>

    <link href="https://unpkg.com/[email protected]/jquery-ui.css" rel="stylesheet" />
    <link href="https://unpkg.com/[email protected]/jquery-ui.structure.css" rel="stylesheet" />
    <link href="https://unpkg.com/[email protected]/jquery-ui.theme.css" rel="stylesheet" />
    <script src="https://unpkg.com/[email protected]/jquery-ui.js"></script>

    <link href="https://unpkg.com/[email protected]/pqgrid.min.css" rel="stylesheet" />
    <link href="https://unpkg.com/[email protected]/pqgrid.ui.min.css" rel="stylesheet" />
    <link href="https://unpkg.com/[email protected]/themes/steelblue/pqgrid.css" rel="stylesheet" />
    <script src="https://unpkg.com/[email protected]/pqgrid.min.js"></script>
    <script src="https://unpkg.com/[email protected]/localize/pq-localize-en.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>

    <script src="https://unpkg.com/[email protected]/dist/FileSaver.min.js"></script>
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'css/blog.css' %}">
</head>

<body>
    <div class="page-header">
        <h1><a href="/">Analysis Result</a></h1>
    </div>
    <div class="content">
        <div class="row">
            <div class="col">
                <div id="grid_json" style="margin:100px;"></div>
                {% block content %}
                {% endblock %}
            </div>
        </div>
    </div>
</body>

</html>

Pages: [1]