pdahal has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Forward tracing a text
by kcott (Archbishop) on Jun 02, 2017 at 05:10 UTC

    G'day pdahal,

    You've made a number of posts recently that look very similar to this one.

    You've been repeatedly asked to provide more information: sample input, SSCCE, and so on.

    Kindly read through your past posts and the advice and requests therein. Then post something we can actually help you with. Thankyou.

    — Ken

Re: Forward tracing a text
by Marshall (Canon) on Jun 04, 2017 at 02:48 UTC
    I refer you to this link Re: CGI to query other websites that I posted 7 years ago in 2010. I clicked on the links therein and although these links are obsolete, they do refer and forward to current PubMed pages.

    The basic situation is that if your want to use PubMed in any serious way (which means bioinformatics), you should use the PubMed library of functions to access their site. They have programs and libraries that are compatible with Perl. This will be much more efficient for both your code and their server site.

    I think what I said 7 years ago is still valid. I highly recommend that you look at the current PubMed tools. I am sure that they are even better in the last 7 years.

    Update: ok, resolved PubMed link from above Monk Post: Entrez Programming Utilities Help
    "The Entrez Programming Utilities (E-utilities) are a set of eight server-side programs that provide a stable interface into the Entrez query and database system at the National Center for Biotechnology Information (NCBI)". The part about "stable interface" sounds pretty good to me.

Re: Forward tracing a text
by thanos1983 (Parson) on Jun 02, 2017 at 09:23 UTC

    Hello pdahal,

    As the fellow monk kcott asked you for Short, Self-Contained, Correct Example, I would suggest to try to understand why he did? It is not because he wants to torture you, or for any other reason than simply it is necessary for us to be able to reproduce your problem. Most of the monks here are not expert on all areas but are willing to test and experiment with different areas.

    If you do not provide us with anything how can you expect anybody to help you?

    Having said that I went online and I did a random search using your keywords and the first result that I found is Access abstract from pubmed using Bio::DB::EUtilities. I have no idea if this is something that you are looking for or you want to use another module other than Bio::DB::EUtilities.

    According to the comments the full example provided by the developers is working (I have not tested it).

    On your next question it would be better for you to come a bit prepared with more information. We can not read your mind and understand what you want to do or how you want to do. Since everyone is devoting their free time to help you I think it would be better to provide us much information as possible.

    Update: I could not resist to give it a try, so the following piece of code it works (taken from the link that I provided you):

    #!/usr/bin/perl use say; use utf8; use strict; use warnings; use XML::LibXML; use Bio::DB::EUtilities; my @ids = (23298400); my $factory = Bio::DB::EUtilities->new( -eutil => 'efetch', -email => 'mymail@foo.bar', -db => 'pubmed', -retmode => 'xml', -id => \@ids); my $xml = $factory->get_Response->content; my $xml_parser = XML::LibXML->new(); my $dom = $xml_parser->parse_string($xml); my $root = $dom->documentElement(); for my $node ($root->findnodes('//*[text()]')) { my $name = $node->nodeName(); if ($name eq 'Abstract') { for my $child ($node->findnodes('*')) { binmode STDOUT, ":utf8"; say $child->textContent(); } } } __END__ Adult cardiomyocytes have little ability to regenerate, thus cardiac r +egeneration therapy represents a potential method for treating severe + heart failure. Human amniotic mesenchymal cells (hAMCs) have the pot +ential to be a useful cell source for cardiac regeneration therapy. W +e attempted to isolate stem cells from hAMCs and differentiate them i +nto cardiomyocytes. Nanog promoter-Cre plasmid and cytomegalovirus (C +MV) promoter-loxP-STOP-loxP-Red-puro(r) plasmid were co-transfected i +nto immortalized hAMCs (iHAMs). Nanog-positive iHAMs were treated wit +h 5-azacytidine (5-aza), trichostatin A (TA), activin A (AA), and bon +e morphogenetic protein-4 (BMP-4), or co-cultured with murine fetal c +ardiomyocytes for cardiomyocytes differentiation. Isolated Nanog-posi +tive iHAMs were analyzed by quantitative RT-PCR and immunofluorescent + staining before and after differentiation. Expression of Nanog, Oct3 +/4, Sox2, and Klf4 was significantly higher in Nanog-positive than in + Nanog-negative iHAMs. Nanog-positive iHAMs were stained for Nanog an +d Oct3/4 in the nucleus. Nanog-positive iHAMs treated with 5-aza expr +essed Nkx2.5, GATA-4, human atrial natriuretic peptide (hANP), cardia +c troponin T (cTnT), myocin light chain (Mlc)-2a, Mlc-2v, β-myos +in heavy chain (β-MHC), hyperpolarization-activated cyclic nucle +otide gated channels (HCN)-4, and inwardly rectifying potassium chann +els (Kir)-2.1. Although Nanog-positive iHAMs treated with TA, AA, or +BMP-4 expressed several cardiac markers, no contraction was observed. + Co-cultured Nanog-positive iHAMs with murine fetal cardiomyocytes sp +ontaneously contracted in a synchronized manner and expressed the car +diac markers. In conclusion, Nanog-positive hAMCs with characteristic +s of stem cells were isolated and differentiated into cardiomyocyte-l +ike cells, suggesting that these isolated hAMCs could be a useful cel +l source for cardiac regeneration therapy.

    Is this something that you are looking for

    Hope this helps.

    Seeking for Perl wisdom...on the process of learning...not there...yet!

      Hello, thanos1983. There's a more or less unspoken consensus on this kind of questions, where the author seems to expect the job to be done without any effort on their part, is to never provide a fully functional answer, but at most pieces of solutions, through documentation or small solutions to sub problems.

      That's not the first post from pdahal with a clear lack of effort. Actually the title from this nodes reminded me of Backtracking in perl, where it kind of looks like the OP tried pretty much the same approach, but by replacing "back" by "forward", just in case it would fool us into giving the answer. So this might have played a role on the number of downvotes you got (which would be infortunate, you're not supposed to know the posting history of the monks you answer to)

      NB: There was a discussion a few days ago on a closely related subject here.

        Hello Eily,

        Thanks for the time and effort providing an explanation. Well from one point of view I agree but I have been in a similar case in the past where although I had done really hard work and research on my problem I was not able to found the solution. Maybe it was 5 - 6 years ago. I asked the forum for assistance and people where so happy to help me with my problem that more or less laid that was the trigger for me to join the monastery and try to become a monk my self.

        Having said that, I am a firm believer that every question should have an answer. To be 100% honest I saw the answer of fellow monk kcott and although it is complete and include exactly what it should include I thought, why not spend some time and work with Biology and Perl. Never tried it before this is why I wanted to play. I can not blame anyone that down-voted me I just carried a bit too much I suppose.

        Well I always say you will never learn until you try and fail and try again. :D

        Hopefully next time with more correct approach.

        Again thanks for your time and effort.

        Seeking for Perl wisdom...on the process of learning...not there...yet!
A reply falls below the community's threshold of quality. You may see it by logging in.