Header Leaderboard Ad

Collapse

Question: Is it possible to get local blast output directly in Biopython, without mak

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question: Is it possible to get local blast output directly in Biopython, without mak

    Hi

    I am currently filtering through a large amount of reads from a 454 machine. I would like to blast every read against a local blast database and check if the sequence is indeed from a targeted genus/species and not a contaminant. For that I would like to get a direct output to python, so I can read it directly and filter it out if the top matches aren't from the same genus or if the score is too low.

    Code:
    for seq in SeqIO.parse(fasta_file, "fasta"):
            counter +=1
            blast_cline = NcbiblastnCommandline(query="G:\\454 dataset\\new2.fasta", db="database", evalue=0.001, outfmt=5, out="G:\\454 dataset\\blast2.xml")
            stdout, stderr = blast_cline()
            print(stdout,stderr) 
            if counter == 1: break
    Also i would like to give the query sequence from parsing through the file, as it stands it gets the query from the "new2,fasta" file. The counter and the break are temporarily there, till I find a way to get it to accept the seq variable as its query input.

    How could I get a stdout output from the local blast? Also is it possible to give the query input a variable and not a file?

  • #2
    cross posted: https://www.biostars.org/p/140535/

    Comment


    • #3
      See answers on https://www.biostars.org/p/140535/

      Please don't cross-post the same question to multiple forums (without adding the links), as you waste people's time. There is a lot of overlap between the posters here and on BioStars.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Improved Targeted Sequencing: A Comprehensive Guide to Amplicon Sequencing
        by seqadmin



        Amplicon sequencing is a targeted approach that allows researchers to investigate specific regions of the genome. This technique is routinely used in applications such as variant identification, clinical research, and infectious disease surveillance. The amplicon sequencing process begins by designing primers that flank the regions of interest. The DNA sequences are then amplified through PCR (typically multiplex PCR) to produce amplicons complementary to the targets. RNA targets...
        03-21-2023, 01:49 PM
      • seqadmin
        Targeted Sequencing: Choosing Between Hybridization Capture and Amplicon Sequencing
        by seqadmin




        Targeted sequencing is an effective way to sequence and analyze specific genomic regions of interest. This method enables researchers to focus their efforts on their desired targets, as opposed to other methods like whole genome sequencing that involve the sequencing of total DNA. Utilizing targeted sequencing is an attractive option for many researchers because it is often faster, more cost-effective, and only generates applicable data. While there are many approaches...
        03-10-2023, 05:31 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 01:40 PM
      0 responses
      6 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-29-2023, 11:44 AM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-24-2023, 02:45 PM
      0 responses
      20 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-22-2023, 12:26 PM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Working...
      X