49,844 results • Page 1 of 997
I want to extract some base pairs from a FASTA file. There is a given sequence, say marker sequence. Every time this marker sequence occurs in the FASTA file, I want to...extract n base pairs to the left of it (before it). Is it possible to do so using biopython? If so, please tell. Thank you. PS - I know it seems quite simple. But I am very new to python. And I have to do this using biopython
updated 9.2 years ago • priyankakukreja267
I am trying to use BioPython to search through a fasta file. I can get BioPython to search and return the entire fasta file. However, I want to be...able to then specify a specific uniprot in that fasta file and have BioPython search for it and returns its attributes e.g. ID, seq and so on. This is the code I have to search through...the entire fasta file: from Bio import SeqIO for reco…
updated 7.0 years ago • chrisgbeldam
Hello, I am trying to translate a DNA FASTA file to Protein FASTA file using biopython. I am trying to translate about 5,000 gene extractions, so anything which requires...copy and pasting will not work. I need the output as a FASTA file. I have seen previous threads which are similar, but those are outdated and do not work with later versions of Biopython
updated 21 months ago • biology
If I'm using the FASTA files from the link below, what Alphabet type should I use in Biopython? Would it be IUPAC.unambiguous_dna? link to FASTA...files: http://hgdownload.cse.ucsc.edu/goldenPath/hg19/chromosomes/?C=S;O=A
updated 9.7 years ago • sameer
Hi everyone, I'm pretty sure this would be a super simple python script using Biopython, but could someone point me in the right direction? I have a Fasta file with 229 sequences, they are named by only their...genbank accession number. I have a text file with the genbank accession numbers of the sequences I want to extract from the original fasta file with the 229 sequences...I would like to b…
updated 7.3 years ago • tpaisie
I search for any Str allele or sequence I want to know the location of that sequence in that fasta file (chromosome no in which that sequence lies, base-pair location where that sequence starts and ends) but I am unable...to do this thing by using biopython. I am told that fasta files does not contain chromosome information so what other thing I can do. I have also tried...cram/bam file but biopy…
updated 10 months ago • muhammad.khizerkiet
Hi, I am new to python. I am trying to translate some dna sequences (from a multifasta file) with the biopython .translate() method. However, it seems that by default the alphabet of the fasta sequences is set to SingleLetterAlphabet...and this is a problem to do the translation. Is there a way to change the Alphabet feature of my fasta sequences to "unambiguous_dna" or similar? Thanks for any he…
updated 12.6 years ago • Laura
I have the following FASTA file, `original.fasta`: ``` >foo GCTCACACATAGTTGATGCAGATGTTGAATTCACTATGAGGTGGGAGGATGTAGGGCCA ``` I need to change the...the corrected file again with BioPython and printing out the record id: ```py with open(corrected_file) as corrected: for record in SeqIO.parse...corrected, 'fasta'): print record.id # prints 'bar', as expected ``…
updated 19 months ago • Jeroen Van Goey
eg: 10 20 1000 4000000 I want to extract the base call at these positions from a fasta file using biopython. This is what I have tried: query_dic ={} with open(line) as pos_file: for x in pos_file: for seq_record...in SeqIO.parse(query_file, "fasta"): nuc = seq_record[x] …
updated 6.9 years ago • s.i.lipworth
Hello everyone: I have written a script using biopython to try and fish out nucleotide sequences of aligned proteins (within FASTA files). My task is to use local genbank...files of particular strains and try to extract the nucleotide sequences based on the aligned FASTA files. I'm having some trouble...finishing the script, however, but I think it is almost complete: [Biopython script][1] …
updated 5.8 years ago • mirali1025
Hello, I have a similar question regarding Fasta module in Biopython. I am using disembl predictor (Disembl.py) for protein disorder and I have a mistake ImportError...cannot import name Fasta. I read an answer in "Fasta module in Python/Biopython" record - to change Fasta with SeqIO but since I don't know Python, I didn...iterator.next() what to use instead of this? I tried to do the same as i…
updated 12.3 years ago • Jovana
globular regions in proteins. Unfortunalte, there is a Python error which is probably related to biopython. I don't speak python, so I am not sure what is going on, but it seems like the offending statment is line 9: from Bio import...Fasta which results in the error ImportError: cannot import name Fasta I do have BioPython installed (and line 8 works fine...although it is also an import…
updated 10.0 years ago • openly
recently, i am leaning biopython for job. However, I got some problem at first step I followed the biopython cookbook and their example did not work...try this in Python: from Bio import SeqIO for seq_record in SeqIO.parse("ls_orchid.fasta", "fasta"): print(seq_record.id) print(repr(seq_record.seq)) print(len(seq_record)) You shouldget something like this on your…
updated 6.9 years ago • mendel18221884
Hello, I have several genomes, each spread across multiple FASTA files. Some of these files contain multiple short sequences, and some of them contain large, chromosome-sized sequences...I need efficient random access to sequence data by FASTA record ID and sequence location (e.g. chr1:12384-12884) from Python. I am currently using BioPython to read all of the FASTA...this with on-disk indexing…
updated 10.7 years ago • interfect
How can I convert bam file to fasta file using Biopython command? please share if some one have any idea. Thanks in advance sazzad
updated 6.2 years ago • Sazzad
Hello, I would like to use Biopython to get fasta sequence using ID that are listed in a text file. Would you be able to help me for coding a little sript
updated 3.1 years ago • florian.grosmaire
Hi all I am currently trying to draw up a synteny map using Biopython's GenomeDiagram package. I have been able to complete some examples with .gb files and now I want to try it on my own...data. Problem: my data is in fasta format. Any one with experience on this? 1. Can GenomeDiagram use fasta files? 2. Has anyone tried to convert fasta to genbank...files? Help will be much appreciated! Re…
updated 20 months ago • ab.tsubaki
with it and I cannot pinpoint my mistake. I wanted a boolean python function to check if a given file is in fasta format. And this, without manually checking myself the extension (.fa, .fasta etc). I have found [this solution][1] which...it doesn't I have an error of the sort when trying to read the fasta file : UnicodeDecodeError: 'utf-8' codec cant decode byte 0xf3 in position 551: i…
updated 2.7 years ago • Rox
am a newbie in this thing of bioinformatics and what I need is to extract a portion of a sequence in FASTA format, for that I have downloaded from ftp.ncbi.nih.gov/genomes/, the fasta file of chromosome 22, which is hsaltHuRef_chr22.fa.gz...and from that file I need to extract from nucleotide 23522552 to nucleotide 23660200 aproximately; how I can do that using BioPython? Also...what does these h…
updated 12.4 years ago • Ma
files to fasta files # then to rename the fasta ID with the sample ID from the lab from Bio import SeqIO import sys # grabbing the...fastq",labels[0]+".fasta","fasta") # taking the converted file and then changing the fasta header handle = open(labels[0]+".fasta","a") for seq_record in SeqIO.parse...files to fasta files # then to rename the f…
updated 8.1 years ago • skbrimer
Please forgive the newbie question, but I am indeed new to BioPython. I'm just simply trying to parse a large file in Genbank format to FASTA format and am using Bio.SeqIO in BioPython...I'm looking to parse an output file with the Accession number and Taxon in the FASTA > header and then the Genbank Taxonomy instead of the nucleotide sequence...I am comfortable with parsing just the fast…
updated 12.1 years ago • Josh Herr
I modified a script using BioPython to remove sequences with only gaps from multifasta files. But I struggle on how to loop this over multiple files...as I don't fully understand how BioPython works. How would I set the input and output files in this case? Thanks, Jon ``` from Bio import SeqIO INPUT = "test.fas" OUTPUT...test_output.fas" def main(): records = SeqIO.parse(INPUT, 'fasta') …
updated 22 months ago • jon.brate
Hello, I am trying to write a dictionary object to a FASTA file however I have problems with writing it. I could not achieve doing it without using the library or with the library...Biopython). I tried converting my dictionary to list using "dict.items()" then writing it with SeqIOand error is: "AttributeError
updated 6.0 years ago • WeepingMeadow
Hello, How to parse SCOP25 PDB files (fasta sequences) with Biopython? Is it possible in Biopython? I need PDB seqres records and atom records. astral-scopdom...all-1.75.fa. (URL of seqres) astral-scopdom-atom-all-1.75.fa.(URL of PDB atom) After parsing these files , I have to make an alignment of aminoacid residues from seqres and atom records
updated 12.5 years ago • Hpk
Hi I have a large FASTA file which looks like this ``` >EMBOSS_001 GTCATCACAGTTTTCCCCGCCCTGTATATGGCTAATAGGCCCTCGCAATCTCCGATAAAT &gt...Hi I have a large FASTA file which looks like this ``` >EMBOSS_001 GTCATCACAGTTTTCCCCGCCCTGTATATGGCTAATAGGCCCTCGCAATCTCCGATAAAT >EMBOSS_002 CTGATGCTAGTCCCGTGTCCCAAACACTTCCGCAGAAGATCGCCCCGGGGGGCGTGTACC >EMBOSS_003 CGCGCATGGACTCCATCC…
updated 13 months ago • lorenzinip
I have many fastq files that I want to align to a fast file using biopython package
updated 2.8 years ago • AnarchyRage
Hi, I have a set of sequences in a fasta file, i read them into biopython and then i want to make some changes to them (adding or replacing or deleting) and then i...Hi, I have a set of sequences in a fasta file, i read them into biopython and then i want to make some changes to them (adding or replacing or deleting) and then i want to save them to a new fastafile. what i'm doing in the examp…
updated 3.9 years ago • Abdullah
Hi, I have a large fasta file about ~200,000 KB. The files consist of around 1800 genes, more or less the structure of the file is : >gene_1 ['chromosomal...def batch_iterator(iterator, batch_size): #to sort out the genes, and produce a file for each gene + the matching genes. #from biopython code entry = True # Make sure we loop once while …
updated 6.6 years ago • bio90029
Hi everyone, I am new to python/biopython therefore I need this help. I want to use python/biopython to fetch the corresponding sequences from a fasta file...such as unique identifier, start position, end position, strand information stored in a csv file. Please let me know the script. Thanks a lot
updated 7.0 years ago • sharadlko1
I would like to iterate fasta file again and again using Biopython SeqIO object. The python seek (0,0) function can do this. But I am not getting expected...output when I used it with biopython SeqIO object. How can I iterate fasta file from the beginning using biopython SeqIO object
updated 2.3 years ago • Renesh
Hi everyone; this is my first question on the forum. How can I compare if two fasta files contain the same sequence headers? Does any BioPython module exist for doing this? Thanks in advance, peixe
updated 12.8 years ago • Peixe
Hi everyone, I'm new to Biopython and python in general so im going through the tutorials trying to get the hang of it for future job prospects in...Tutorial.html#htoc10 from Bio import SeqIO for seq_record in SeqIO.parse("ls_orchid.fasta", "fasta"): print(seq_record.id) print(repr(seq_record.seq)) print(len(seq_record)) This just leaves the error: Tracebac…
updated 6.4 years ago • damonlbp
When I use BioPython to create a sequence iterator, I find that any characters after the first space (" ") in the header are ignored. For instance...Header With Spaces ATCGATCGATGC The following code: for sequence in SeqIO.parse(open("file.fasta"), "fasta"): print sequence.id Will print: A Is there a way to get the full sequence id while still taking advantage of BioPython's
updated 6.7 years ago • David M
Hi, I have a list of positions I would like to change in a fasta file with the base I would like to change to tab separated as follows: 1 T 2 C 10 T 50 G etc so that eg: ATGTGTC... becomes TCGTGTC...There must be a way to do this but I can't do it - have tried to code it in biopython but can't manage.. any ideas
updated 6.7 years ago • samuel.lipworth
I am attempting to use Biopython to compare all the sequences (~400,000) to a reference sequence. I parsed the fasta file using: for record in SeqIO.parse...filename.fasta", "fasta"). Can someone help with the code to loop over the sequencing in the fasta file and compare it with a string, the reference
updated 3.8 years ago • nameuser
Hi, I am new to Biopython and programming in general. I am having difficulty generating viable scripts to convert the id in my pasta files...to consecutive numbers. I have a text file containing: 1 2 3 4 etc... and my code currently reads: from Bio import SeqIO lines_file = open("Numbers1_50.txt") fout = open("output.fasta...w") handle = open("input.fasta", "r") for se…
updated 7.9 years ago • the_madinator
Hello everyone, I have a fasta file and I need to get the average length of sequences, but I don't have any idea how to do this with biopython package, could
updated 15 months ago • joaovmio
of coordinates some genes in the below given form and I intend to use the genome sequence file to get this coordinate using Biopython. The result should be in form of fasta file i.e `>Bra000001` ....... ``` Bra000001 A03 8794511
updated 19 months ago • imaditi1987
obtain fasta-files (one for each genome), but with the the fasta-sequences in each of the files parsed into individual fasta-sequences...for each gene in the mitochondrial genome. My file : 'tobis_list_of_acc_no.gbk'-file is similar in setup to the 'ls_orchid.gbk' file described on the biopython tutorial...genomes. I have been able to modify a bit of python-code that uses Biopython to write one …
updated 7.3 years ago • swknudsen
Hi ! I want to extract the genome fasta files of 30 samples automatically using python script from here https://www.ncbi.nlm.nih.gov/genomes/GenomesGroup.cgi...taxid=10239&host=bacteria. I want the virusus that have has host bacteria and I am using BioPython Package. Entrez.email = "mail" taxid= 10239 host= "bacteria" num_records = 20 query = f'taxid:{taxid}[Organ…
updated 4 months ago • Bioinformatics_begginner
Initially my problem was to extract all entries from a FASTQ file with names not present in a FASTA file. Using biopython I wrote: ```py from Bio.SeqIO.QualityIO import FastqGeneralIterator...is, it is very slow. On 2Ghz workstation starting from a local disc it can take two days per pair of files: - 4870868 seqs in FASTQ - 4299464 seqs in FASTA Removing title from `corrected_names` speeds u…
Hi! I´m trying to change a stretch of 300,000 nucleotides on chromosome 21, with NNN´s in a fasta file. This turned out to be not such a trivial task. I searched BioPython packages for a solution but can't find anything
updated 6.1 years ago • Grinch
Hey, I have a script that extract features from a large fasta file (1767 MB) using biopython. I am sending it as a bash job via ssh remote server. The job is running for two days now.. Is there...mRNA features from the features_df get the matching chromosome seq from the genome file create a feature object and write it to an output fasta file. """ out …
updated 2.1 years ago • Michal Nevo
various species' orthologous sequences. I'm running on a Linux server, and am mainly aiming to use BioPython or Linux programs for this. I've run OrthoFinder on 28 species of seaweed, which gave out roughly 10,000 orthogroup...sequences fasta files, each of which is a a multi-fasta file. I've concatenated each of them into one huge multifasta file, and now I want to...extract the fasta files ac…
updated 2.7 years ago • lachiemck
in trying to get the flanking sequence from NCBI or Ensemble from a list of microRNA sequences in a fasta file. I have fasta file with the human microRNA sequences, and would like to map it and fetch the upstream and downstream...sequence, but not with the mature ones. Guess that should go from a script. Great if done in biopython, but any help is welcome. thanks in advance! sgm
updated 7.3 years ago • sgmiriuka
Hi there, Is there any way to detect just the Fab region of an antibody using a protein fasta file and Biopython? I was originally considering just using regex for finding conserved regions of the hinge and cutting...there but was wondering if there was a feature in Biopython that can do this already? Or is there a less heavy handed way to achieve this? We are mainly looking at IgGs and interested
updated 7 months ago • PamCraven
I'm working on this problem of finding the most frequent 6-nucleotide long patterns from a given DNA file which is a standard FASTA file looking like: >name of protein ACGTACTAGACAGAGAGAGAG .... <more nucleotides> >name...of protein ACGTACTAGACAGAGAGAGAG .... <more nucleotides> Now I have these sequences in a file and I have a method for counting th…
updated 12.4 years ago • Dhillonv10
I'm new to biopython and I'm just having trouble converting a .txt file into a .fasta file using biopython
updated 3.1 years ago • trejomarco6
I want to make a clustalw alignment using biopython on a fasta file that have many reads converted from fastq format to fasta format (the reads have different lengths...when I run clustalw on this file I got this error: Traceback (most recent call last): File "F:\CIT656\pythonProjects\CIT656_Spring21\Project_Script.py...line 33, in <module> stdout, stderr = clustalw…
updated 2.8 years ago • FadyNabil
Dear all, I have a problem with Biopython. I give it a fasta-sequence and need to make either reversed fasta sequence out of it in a separate output file, or just...complement fasta-sequence in a separate output file. The four lines below were taken from Biopython cookbook, and the script works perfectly...rc_"+rec.id, description = "reverse complement") \ for rec in SeqIO.parse("exa…
updated 7.4 years ago • natasha.sernova
49,844 results • Page 1 of 997
Traffic: 1497 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6