Questions tagged [biopython]

Biopython is a set of freely available tools for biological computation written in Python.

Filter by
Sorted by
Tagged with
3
votes
0answers
35 views

Using dssp after chain extraction

I have a list of PDB IDs with realtive chains that are to be extracted, and the run on dssp. For the single chain extraction I tried several methods, such as: ...
1
vote
2answers
87 views

How to run Jupyter script on Slurm HPC

Now jupyter installed on the server and I am using below code to plot the rarefaction plot but I am still getting some error. could you please suggest how I can get rid of it? ...
0
votes
0answers
13 views

Predicting ATC codes at level 3 in python

I am trying to implement the algorithm implemented in this paper on Python. Basically it is a multi labeling algorithm to make out of sample prediction at level 1 of Anatomical Therapeutic Chemical (...
0
votes
0answers
22 views

GTF parser for Python

I found this GTF parser for Python. However, it does not work with Scallop's GTF file: ...
0
votes
0answers
18 views

Calculating secondary structure and hydrophobicity from PDB file

I am writing in PyCharm using BioPython package. Given a PDB file 4agh.bdp I'm trying to compute secondary structure and hydrophobicity of the protein, using these ...
2
votes
2answers
43 views

How to get the genomic sequences from a blat result?

Assume we have a query.fa file that contains sequences and we run: ...
1
vote
1answer
58 views

Dealing with duplicate keys

I got the following error: attempting to use to_dict to index a multiple sequence FASTA file with duplicate keys. Are there methods for working around duplicate keys in biopython? I was thinking to ...
0
votes
0answers
18 views

Retrieve ATC codes for New Clinical Trials

I have a STATA list of 4000 medicinals used in clinical trials and need to associate an ATC to them. I have scraped wikipedia and BBPharma website and found out some ATCs (missing and None included). ...
0
votes
1answer
54 views
0
votes
3answers
38 views

Get gene sequence based on the annotation

I've got the reference genome with Python like so: ...
0
votes
0answers
15 views

Blastp MSA to the same length

To generate aligned protein sequence truncate to the same length, I use blastp in biopython for MSA. I have multiple queries and one subject sequence. However, the alignment never returns the same ...
0
votes
1answer
29 views

Extract residue sequence from pdb file (in biopython, but open to recommendations)

I'm new to Biopython and I'd like to extract the sequence of residues from a pdb file. My two questions are: What is the simplest way to do this? (Esp. when there is more than one sequence) and ...
1
vote
1answer
33 views

Modifying protein_scale in ProteinAnalysis in SeqUtil in Biopython?

Is there a way to give weight arguments to each of the residues when using protein_scale in the ProteinAnalysis module of Bio.SeqUtils.ProtParam? I thought this would be done with the window and edge ...
0
votes
2answers
46 views

Transcribing DNA exons and append transcripts into a list

I am trying to find a way to read and transcribe a list of DNA sequences (list of lists) only when the for loop finds a start codon (triplet of the list items) and until it finds a stop codon, over ...
0
votes
0answers
13 views

NCT search in PubMed via Entrez (python)

first time I post here so, please, be patient. So I am currently working with Entrez (Biopython) in order to retrieve the number of articles for a given disease/indication. My data provide both the ...
1
vote
1answer
88 views

How to install/import Biopython into Python 3.8/ PyCharm IDE

I'm new to Python/Biopython programming. I'd like to install Biopython into my PyCharm IDE but I've tried all instructions on this, but it's not confirming it. I have the available biopython file ...
0
votes
2answers
59 views

Python: How to write duplicate sequences removed from fasta file to new file

I currently am using this code to remove duplicate sequences from the fasta file. However, I would also like to write a new file with only the removed duplicates as well as a count for how many times ...
0
votes
1answer
76 views

Remove Redundant Sequences from FASTA file in Python

I'm attempting to remove redundant sequences from a fasta file (from NCBI). When I execute this code, it returns the number of spots, not the number of sequences. (Number of spots: 408,293, Number of ...
1
vote
1answer
49 views

Relaxed and sequential Phylip format conversion

I routinely use AlignIO in BioPython for manipulating alignments and in context here moving from fasta format to phylip format. Alot of phylogeny packages accept a relaxed (sequence ID) & ...
0
votes
1answer
54 views

How can i modify FASTA headers in a multi fasta file using BioPython SeqIO

I have a multi fasta file similar to this (relatively new here so uncertain of best way to present this; I have gone for an output and the code i used to make it - belt and braces...): ...
1
vote
0answers
16 views

How to (efficiently) search nuccore to retrieve only annotated sequences?

I wish to efficiently search nuccore to retrieve only annotated sequences. By "annotated" I mean that the nuccore entry contains annotation information. An equivalent definition (if I understand ...
0
votes
0answers
17 views

Meaning of the Flags attribute returned by Entrez.esummary(db='nuccore')

My Question Calling Entrez.esummary for the nuccore db returns records with various fields. One of these fields is Flags. I ...
1
vote
0answers
19 views

Is there a built-in parser for the textual feature table that Entrez.efetch returns?

Entrez.efetch helpfully gives me the feature table of a nuccore entry. If I understand correctly, efetch can only return the ...
2
votes
0answers
38 views

MSA (protein) with biopython or something else?

I am very new to bioinformatics (and python in general), but I would like to use python to more efficiently analyse enzymes both in terms of structure and functio, using Jupiter notebook. I would like ...
0
votes
0answers
24 views

Finding regions between ORFs

I'm doing work on mRNA and need to get predicted mRNA sequences from a genome. I'm working with this genome https://www.ncbi.nlm.nih.gov/nuccore/U00096.3 (E. coli k-12 mg1655). So have a genome ...
0
votes
0answers
22 views

Can I pull a jackhmmer output file into ClustalO for pairwise alignments?

I'm still working on figuring out how to send ClustalO multiple jobs. I have a hmmer output and was looking to do a mixture of pairwise and local alignments on a subset of these. Is it possible to ...
1
vote
2answers
133 views

Can I automate CLUSTALO and output alignment sequence identity?

I've detected homology between targets of ligands in drugbank and proteins in the proteome of a pathogen. I've parsed the output very rudimentary and calculated my query coverage. This exists in an ...
2
votes
1answer
64 views

Possibility to save output blastn table in memory using biopython

Is there a possibility, using biopython to save output table of blastn in memory, not in file on hard drive, for process it using pandas for example and then delete it from memory? I mean, is there a ...
1
vote
0answers
18 views

Indel quality from mpileup

Could someone please confirm that I understand this correctly? I have the res and qual columns from mpileup and I would like to match them to get the qual per base. It seems that the indel initiation (...
1
vote
1answer
41 views

Visualizing cell growth

I model the following events: a rod-shaped cell with center $x$ grows symmetrically until it reaches a maximum length/age, it divides into two identical cells, and the process continues. At division, ...
2
votes
1answer
23 views

Tools for modelling and visualizing growth of cells

I am looking for a program/GUI app/package that would help me do simulations for cell growth. I have a microscopic mathematical model, and the scenario is basically the following: I start with a rod-...
1
vote
1answer
26 views

Cutting the sequence into several sequences with the information of a dataframe

I have a fasta file with several 120-concatenation protein sequences. I also have a data frame with 120 names of proteins in column 1 and their length in column 2. Using this dataframe I want to ...
0
votes
1answer
38 views

how to generate structure file from blast results of an input sequence

I have tried to incorporate blast in my application using biopython.i could extract the blast results but now i want to extract the structure file corresponding matches. My code is : ...
1
vote
2answers
77 views

Parsing a GenBank file with multiple gene entries

Basically a GenBank file consists of gene entries (announced by 'gene') followed by its corresponding 'CDS' entry (only one per gene) like the two shown here below. I would like to extract part of the ...
0
votes
0answers
23 views

What values for database keyword can be used with Bio.Blast.NCBIWWW.qblast?

I want to make a Blast search with Bio.Blast.NCBIWWW.qblast for a protein sequence. from Bio.Blast.NCBIWWW import qblast qblast("blastp", "nt", sequence=seq) The ...
1
vote
2answers
150 views

How to create a .phy file for constructing a phylogenetic tree?

I'm new here. I need to construct a phylogenetic tree from 16s Sequence data (merged 151 bp) and color the branches/nodes based on my experimental conditions. From this blog, it looks like I need a ....
1
vote
2answers
46 views

No output when trying to obtain protein sequence from PDB file

I am trying to obtain the sequence from PDB file, but no output is given when I run the following code : ...
3
votes
2answers
277 views

How to translate amino acid sequences to Nucleotide sequences

I want to convert a list of fasta ( protein sequences) in a .text file into corresponding nucleotide sequences. A Google search gives me result of DNA to protein conversion but not vice versa. Also, I ...
2
votes
1answer
76 views

renaming IDs in gff3 with BCBio.GFF

I wrote a script which should changes IDs in a GFF3 file. Unfortunately, the below script has two problems. It attaches the new ID to Parent which leads that ...
2
votes
1answer
84 views

Infer the new (Ban et. al) ribosomal nomenlature (ex. uL53 ) from the ribosomal protein's sequence

I'm trying to programmatically construct a name for each protein subchain in any ribosome from Uniprot in accordance with Ban et. al's 2014 proposal (excerpt given below) using PDB's and Uniprot's ...
1
vote
1answer
73 views

Unable to read all alignments in stockholm format : UnicodeDecodeError: 'utf-8'

I have a file in Stockholm format and I am trying to read it using the Biopython package. The code is as follows : ...
0
votes
1answer
55 views

Given a .gb file and a locus - how to get relevant annotations in Python?

Given a .gb file and a specific locus in the genome - how can I retrieve the relevant annotations in Python (i.e., annotations that include that locus)? I could ...
3
votes
1answer
72 views

protein secondary structure matching/comparison scoring

I want to compare two secondary structures of aligned proteins. I do not know exactly how to do it well. Example: ...
0
votes
2answers
75 views

What kind of analysis is practically done on GSE data files?

I have a GSE data file in csv file format containing fields such as: ID, adj.P.Val, P.Value, t, B, logFC, Gene.symbol, Gene.title. In which adj.P.Val, P.Value, t, B, logFC fields being numeric. What ...
1
vote
1answer
161 views

Is there any tool for fuzzy sequence matching?

Note: this question was also asked on biostars are you aware of any tool that is able to perform error-tolerant pattern-matching search on protein FASTA files? For example, I want to know, which ...
0
votes
2answers
74 views

read and matching pattern with python

I have read the content of a text file into pandas and needed some help matching the pattern. Here is the pattern, where a can any number greater than zero and <...
3
votes
0answers
42 views

How to load output from the kegg API in biopython into a pandas dataframe?

Biopython provides a (bit unintuitive) API to access to the Kyoto Encyclopedia of Genes and Genomes (KEGG). I am trying to make use of it, but the output is quite unhandy as a string. What is the best ...
1
vote
1answer
40 views

Biopython Genbank writer not splitting long lines

I am parsing a csv file of annotated sequences and using Biopython to generate Genbank files for each. I want to add annotations of the sequence features. My output file shows features listed without ...
2
votes
1answer
45 views

Parsing specific features from Genbank by label?

I'm trying to parse a Genbank file to find a specific feature. I can pull it out if I know the feature type (e.g. repeat_region). E.g. if I'm looking for this feature: ...
1
vote
1answer
72 views

From ensembl id to protein structure

Forgive me if this question is too trivial. I have a list of ~700 Ensembl ID. I need to extract the protein structures of each Ensembl id. How can I do this? Is there any script(python, R) so that ...