Questions tagged [biopython]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
45 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
29 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
22 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
75 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
56 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
11 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
17 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
1answer
62 views

How to remove duplicates from a fasta file using python

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

How to obtain desired output?

I am working on a project using the following command within nano: ...
1
vote
3answers
69 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
31 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: ...
1
vote
1answer
59 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 ...
2
votes
1answer
75 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
1
vote
1answer
135 views

Nonbonded interactions on the GPU

i'm using this command gmx mdrun -deffnm nvt0 -nb gpu but got ...
1
vote
2answers
70 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
31 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
38 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
47 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
30 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
120 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 ...
4
votes
0answers
55 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: ...
2
votes
2answers
128 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
14 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
48 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
37 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
47 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
104 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
19 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
55 views
0
votes
3answers
54 views

Get gene sequence based on the annotation

I've got the reference genome with Python like so: ...
0
votes
0answers
18 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
3answers
259 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
49 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
22 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
437 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
83 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
115 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
114 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
72 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
20 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
26 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
20 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
1answer
76 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
25 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
143 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
66 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 (...