Questions tagged [biopython]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

10bp sliding window quality score

I am having trouble creating a 10 basepair sliding window that goes through seq and trim them all 10 basepairs that have an average quality score (...
0
votes
1answer
23 views

Using Entrez.efetch() to retrive .fasta file from any NCBI database?

I tried to use these python codes to retrieve a .fasta file from gene database, but the output were the parameters of the report ...
1
vote
0answers
17 views

Finding annotated counterpart after BLASTn with efetch (Biopython)

I am creating a pipeline for the identification of unknown transcripts. After a local BLASTn search of the transcripts, I have a large list of the respective hits with different genomes. I have the ...
1
vote
1answer
42 views

Biopython BioSQL error : AttributeError: 'DBSeq' object has no attribute '_data'

Hi I am playing with Biopython and BioSQL, I manage to create an MySQL database using Managing local biological databases with the BioSQL module tutorial: and load 2909 fasta sequences in it through: <...
0
votes
2answers
83 views

Remove Redundant Sequences from FASTA file with Biopython reducing memory footprint

I need help with my Biopython code, I am kind of new to Python and Biopython so please don't be harsh on me. Everything started from here: Remove duplicated sequences in FASTA with Python I answered ...
4
votes
1answer
21 views

KeyError when getting features from a genbank file with biopython with some accessions but not others

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 ...
1
vote
2answers
57 views

biopython-motifs , How can I create motif from sequences of different length?

I want to create motif of different length kmers. Following code works for kmers of same length but not different length.What to do ? ...
0
votes
0answers
32 views

BioPython - Retrieve sequence records from pubmed database

I'm assigned a task to fetch sequence records from "pubmed" database. I know this database is for publications and citations, but how can I retrieve those records from it? is that even ...
2
votes
0answers
28 views

How to extract clusters from a phylogenetic tree?

I am using Biopython Phylo and RDkit Cluster to obtain a UPGMA tree from a distance matrix of 5k x 5k entries. How can I extract clustered entry names given a number of clusters? For example, Bio....
-1
votes
1answer
107 views

Biopython SeqIO check input file

Hi I am trying to learnt python3 and Biopython, I am trying to check imported fasta file before processing so far using: ...
-4
votes
1answer
59 views

Creating a tab delimited column [closed]

I have a blast file produced. I executed a blast(x) command outputting both "qeseqid" and ...
1
vote
1answer
12 views

What is the best way to drop alignment artifacts in sequence objects in biopython?

I have a bunch of sequences created with Roary which I want to preprocess. When I read the sequences (genomics data) I want to translate them to protein sequences ...
1
vote
0answers
18 views

Detecting Allelic Imbalance

I am interested in detecting allelic imbalance for a credible set of SNPs. Currently, I am looking for some packages, hopefully, for Python, that can assist with this. I am aware of this R package, ...
1
vote
5answers
125 views

How to remove duplicates from a fasta file using python

I am using the following command: ...
0
votes
2answers
42 views

How to obtain desired output?

I am working on a project using the following command within nano: ...
1
vote
3answers
104 views

How to count the kmer occurrence in FASTA file considering overlapping and reverse complement?

I am using count_overlap() for counting the kmers from Biopython . Does it take the reverse complement of kmer into account? I need to count reverse complement too
1
vote
2answers
45 views

Extract sequences from MultiFASTA aligned file, by coordinates

I am trying to extract a specific sequence from a multifasta file, from each sequence in the aligned file. The sequences look like this, and there are 32 sequences within the multiFASTA: ...
0
votes
1answer
98 views

Why SeqIO.parse method isn't working?

I am trying to follow the tutorial from from the Biopython website here and I am right at the beginning (2.4.1), where I am trying a Simple FASTA parsing example which is ...
1
vote
1answer
134 views

I want to write python program to cut a DNA sequence at an EcoRI restriction site and print the two fragments after cutting

Seq = AAAAAAAAAAATTTTTTTTTTTGAATTCCCCCCCCCCCGGGGGGGGGGG Restriction site = GAATTC I want to cut the sequence at GA/ATTC I tried split method in python but It does not cut at GA/ATTC. Please help
0
votes
1answer
144 views

Nonbonded interactions on the GPU

i'm using this command gmx mdrun -deffnm nvt0 -nb gpu but got ...
1
vote
2answers
114 views

How to sort multiple FASTA files based on their content?

I have around 10,000 FASTA files of Influenza A virus. These files contains sequences of each of the 8 segments of the viral genome and I want to separate these files into different locations based on ...
1
vote
3answers
33 views

How do I create Protein Ligand images

I was wondering how I can create images showing the bonds and the residue codes involved in the bound Protein Ligand complex obtained after Molecular Docking as depicted in the image below.
0
votes
0answers
39 views

Python/Biopython - Replace amino acid residue on MSA with “z” from a list of unaligned positions

I'm trying to programmatically replace a set of amino acid residues on an MSA with a "Z" from a list of unaligned positions. Any ideas on how I could do this? Input: a list of unaligned ...
1
vote
0answers
50 views

UTR features in gbk files

I have a gbk files for a viral genome that I have used biopython to add features of the 3' and 5' ...
0
votes
1answer
62 views

How do I obtain a vcf read from a pyvcf.Reader?

I wondered how would I be able to obtain variant based on chrom and location range. Optimally, this function would be like: ...
0
votes
3answers
205 views

Finding motifs: fasta file with 10,000 sequences

I am new to Python. I am trying to parse a fasta file containing 10,000 sequences to look for motifs (microsatellites in particular). I tried using Seq Utils to parse my sequences for a particular ...
3
votes
0answers
67 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
172 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
22 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
116 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
66 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
50 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
151 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
20 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
56 views
0
votes
3answers
63 views

Get gene sequence based on the annotation

I've got the reference genome with Python like so: ...
0
votes
0answers
20 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 ...
1
vote
4answers
580 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
61 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
48 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
27 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
784 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
117 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
170 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
193 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
114 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
22 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
28 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
21 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 ...