Questions tagged [genbank]

GenBank format (GenBank Flat File Format) consists of an annotation section and a sequence section. The start of the annotation section is marked by a line beginning with the word "LOCUS".

GenBank format (GenBank Flat File Format) consists of an annotation section and a sequence section. The start of the annotation section is marked by a line beginning with the word LOCUS.

53 questions
1
vote
1 answer

socket.gaierror while downloading genbank files w/ biopython

I would like to download genbank files from NCBI using Biopython and a list of accession numbers (note that I call the script with an email address as an argument e.g., python scriptName.py emailAddress) import os import os.path …
cer
  • 1,961
  • 2
  • 17
  • 26
1
vote
1 answer

File conversion between .fasta and .genbank format

I have to create two functions that should allow me to open .genbank files and convert them into a .fasta file and the other way around. What I have for the moment is this: def Convert(file, file1) handle_input=open('file', 'rU') …
1
vote
1 answer

Improve genbank feature addition

I am trying to add more than 70000 new features to a genbank file using biopython. I have this code: from Bio import SeqIO from Bio.SeqFeature import SeqFeature, FeatureLocation fi = "myoriginal.gbk" fo = "mynewfile.gbk" for result in results: …
Mastodon
  • 131
  • 12
1
vote
1 answer

How to get the scientific name given the GenBank accession code to biopython?

Someone knows how I can get the scientific name (or all the features) from a data in the GenBank using only the GenBank code accession and biopython. For example: >>> From Bio import Entrez >>> Entrez.email = someuser@mail.com >>> Input =…
Ivan Castro
  • 581
  • 2
  • 10
  • 22
1
vote
1 answer

Conversion of GenBank format file to FASTA format

I am quite new to Java and want to build a program that can convert a GenBank text file to FASTA format. Basically there will be two texboxes: one where I will upload the GenBank format file, and a second to show the converted FASTA format…
0
votes
1 answer

How to make ".gbk" file from gbff/gff/fna/gb or any Genbank file format?

I am using a software needs reference geneome in .gbk format (which is obseleted by genebank and is replaced by gbff). I searched to find a file convertor however I failed. I supposed gb and gbk are the same, so I renamed gb to gbk, however didnt…
Nar_sys
  • 9
  • 4
0
votes
1 answer

How to retrieve data until a keyword in GenBank with Perl?

I'm trying to write a script that retrieves data from GenBank files. I only need the info until the COMMENT part of the annotation. This is my input: LOCUS mitochondrion_genome 19524 bp DNA HTG 17-DEC-2022 DEFINITION Drosophila melanogaster…
user21991719
0
votes
0 answers

Error in readGenBank("sequence.gb") returns false attempting to extract genes from a genbank file in R

I have the following code in R, which I took from how to extract genes from genbank file in R I wish to create a data.frame using the whole data from the genbank file so I can use the metadata to automatically filter out several entries from my…
Gaby
  • 1
0
votes
1 answer

how to extract genes from genbank file in R

I ask this question because I don't really know how to do it. I have a genome in a gb format (YJ016_I.gb) so I want to import in R and then export all the genes in nucleotide format, or just take one of the sequence using the name of the…
abraham
  • 661
  • 8
  • 14
0
votes
1 answer

BioSeqIO not recognizing .gbff files

I am trying to convert a bunch of .gbff genebank files to .gbk in order to parse sequences, etc. I got the following code to work and convert a single file, import Bio from Bio import SeqIO count = SeqIO.convert("filename.gbff", "genbank",…
Charis
  • 1
0
votes
0 answers

KeyError when getting features from a genbank file with biopython

I'm very new to python but i've been using it to extract the sequence of a gene from a genbank file. The issue is is that sometimes i'll get the output i want (prints the sequence to a file) and sometimes it will return a key error. This depends on…
donna
  • 1
  • 2
0
votes
1 answer

Writing and saving GenBank files with biobython SeqIO module

I wand to safe some DNA sequences in genbank file format to include information about genes, domains, etc. I know how to create SeqRecord objects and include all information I wand to have in the file: #my DNA sequence and encoded protein sequence…
anvhunter
  • 21
  • 2
0
votes
1 answer

Modyfing a Genbank file

Hi i am trying to search through a file for a specific list of words. If one of those words if found i want to add a newline underneath and add this phrase \colour = 1 (I don't want to remove the orginal word i am searching for). An extract of the…
Matt Bird
  • 1
  • 1
0
votes
1 answer

SeqIO.parse throwing error in genbank files

I'm working with some genbank seq files and have the following code: for seq_record in SeqIO.parse("datafile_location, "genbank"): And while it can run through most of the seqs in the seq file (which contains multiple seqs) I get the following…
mvh
  • 1
0
votes
1 answer

Trying to read file in FASTA format and then write to another file in Genbank format

Trying to read a file that contains a genome sequence using Seq and SeqIO objects in BioPython. Cannot use the open command. The program should accept a command-line argument containing the name of FASTA file containing the input genome. It made the…