Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
0
votes
0answers
52 views

Python script to calculate properties of amino acids and storing them in matrix

I want to make a python script that can get as input sequence of N amino acids, and the output is a matrix of Nx6 containing 6 features. The features are: Computed volume Hydrophobicity Polarity ...
2
votes
1answer
41 views

ensembldb equivalent in python

Is there a python equivalent to ensembldb? I want to get genome coordinates for a transcript (like the function transcriptToGenome) but need to do it in python. I ...
0
votes
1answer
31 views

Time complexity of the Neighbors function

I implemented the following find_neighbors_with_expected_hamming_distance function that generates all k-mers of Hamming distance at most d from the given Pattern. ...
0
votes
3answers
63 views

Count of each sequence length from a fasta file with header using len function of python

I have a fasta file with 18 sequences inside. I want to extract the length of each sequence with header using the len function. My file looks like: ...
2
votes
1answer
33 views

Programmatically adding hydrogen and remove water to multiple PDB files

I'm trying to dock a ligand to several hundred PDB files (receptors). I thus need to prepare the those PDB files like removing water and adding hydrogen. I can do that manually using Autodock or Pymol....
2
votes
3answers
190 views

How to extract subset of protein structure (PDB format) file based on a subsequence of that protein

I looking at a particular protein structure called 2LY4 accessible from RSCB PDB website. The corresponding fasta sequence for that structure is this: ...
2
votes
1answer
37 views

Automatize classical debugging in a bash script? (normal debugging by hand)

And thanks in advance. I am debugging a text file which is the one the two inputs on the program RGmatch https://bitbucket.org/pfurio/rgmatch/src/master/. The code works. Is that some records give ...
4
votes
1answer
40 views

How do you convert Raw Alignment Score to Bit Score?

I'm coding a pipeline where I make a lot of pairwise alignments, and I end up with raw alignment scores. But, I really need to look at my results in terms of bit scores. I know that the formula is: $𝑆...
3
votes
0answers
39 views

How can I use statistics to compare microbial phenotypes?

Note: this question has also been asked on Biostars I am currently trying to create a theoretical argument that a microbe's phenotype can affect gene expression in their host. I have 5 species of ...
0
votes
0answers
33 views
1
vote
1answer
44 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 (...
1
vote
0answers
18 views

Convert genbank file into tbl file [closed]

I want to submit some phage sequences to NCBI. So I want to transform a genbank file into a tbl file. Can someone help me please? Thanks
1
vote
1answer
31 views

How to detect bedtools version used by pybedtools (in order to correctly preserve strand information when merging gtf records)

I have issues working with pybedtools due to strand information being lost after extracting and merging transcript coordinates from a gtf file. It seems that the solution to preserve strand ...
2
votes
1answer
38 views

How to know if ID correspond to nucleotide sequence or protein with a script

I have a text file that contains a list of IDs (314 sequences): AVP78031.1 AVP78042.1 ATO98108.1 ATO98120.1 ATO98132.1 ... My goal is to make a script (maybe using ...
1
vote
2answers
40 views

How to input the opposite strand of DNA?

I am trying to write a program that will count the repeats of a given DNA strand: I am using a Counter library, something like this code shown below ...
1
vote
0answers
31 views

Load balancing numerous single-threaded processes with Snakemake on the grid

I'm familiar with running Snakemake in a DRMAA-enabled grid environment. (Most often, I write Python programs as wrappers and invoke the workflow via Snakemake's Python API.) Typically, I'm running ...
0
votes
1answer
42 views

Common gene naming conventions and how to convert between them

I have two questions, one is a direct question about some RNA expression data. The other is more broad, but motivated by the first. I have downloaded an expression set for a class project and I am ...
0
votes
2answers
96 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 ...
1
vote
0answers
39 views

Error during File conversion

Conversion of a multi-entry sdf to a multi-entry pdb file with open babel results in the loss of the compound names in the resulting PDB file. Why do you think this might occur and how can I resolve ...
1
vote
1answer
27 views

Create a NHX phylogeny format with r or python

I need help to add information in my phylogenetic tree on each branch. I have two pieces of information at my disposal: 1 ) A phylogenetic tree in newick format : <...
2
votes
0answers
46 views

Snakemake fails because it cannot create logs inside a read-only Singularity Container

I am using Snakemake from inside a Singularity container. Because of that, the directory that Snakemake wants to log to cannot be created, and I get an ...
3
votes
2answers
91 views

Create new range based from existing range (python)

I have a pyranges object that I am looking to iterate over. For each range, I would like to "resize" it to its centre (so start+end/2) and save that into ...
0
votes
0answers
27 views

Reliably create female and male individuals in a -ped file for plink

For a study I need some kind of "decoy" GWAS-data. For this I created a panel with some genes, the same ones as in the real data. From NCBI I fetch some of their SNPs and create my own ...
1
vote
1answer
62 views

How can I use pandas agg here to avoid iteration?

can anyone help me improve this pandas code? ...
1
vote
1answer
144 views

How to convert a SDF molecular structure file to a pandas dataframe with Python?

What is the best python tool to convert a SDF file to a structured data frame (pandas.DataFrame). Similar to Molconvert from ChemAxon? SDF can have different datafields for each compound which I would ...
0
votes
0answers
19 views

How to fetch all protein sequences from c3.ai Covid datalake?

I want to download ALL currently known protein sequences for all SARS-CoV-2 strains. I am not sure how up ...
1
vote
1answer
380 views

What changed wwith Python in WDL change from draft 2 to version 1?

I'm updating my WDL from draft 2 (whichs works fine) to version 1. I'm stuck with a Py snippet ...
0
votes
1answer
165 views

OpenAPI-Generator Python Client Instructions Examples

Trying to learn a little bit of Python and Biopython I ended up figuring out what a Rest API is when the RCSB PDB repository released its new Rest API. I tried to retrieve info from the PDB repository ...
-1
votes
2answers
68 views

How can I convert Protein ID to PDB ID?

I have a list of Protein ID such as Q9S9U6, A2XLL2, Q06402. What name is this ID? UniProtKB ID? And how can I get PDB ID from this list? Is its PDB ID only one? I'm using Python. Get a list of PDB ids ...
0
votes
0answers
35 views

How can I get properties from each one letter amino acid?

Im using python and wish to get properties from each one letter amino acid? I mean M(Met) => Density:1.340, MW:149.21... The RDkit methods atom.GetSymbol(), atom.GetDegree() permit this and I am ...
0
votes
1answer
71 views

Loop Pymol command get_area

I want to select multiple residues from different PDB files loaded on the same pymol session. select resi LIG get_area sele How do I loop the above command to ...
1
vote
1answer
34 views

Segment cell organelles with pixellib

I've got some images of cell organelles and I really want to avoid labeling them by hand. The images all look something like the image below. Is there already an existing model specifially for cells? ...
-4
votes
1answer
61 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
0answers
19 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
149 views

How to remove duplicates from a fasta file using python

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

How to obtain desired output?

I am working on a project using the following command within nano: ...
0
votes
2answers
48 views

How to fix NameError?

I am working on a project and am having issues with the following code that I have written in nano: ...
2
votes
1answer
88 views

Survival analysis using CoxPH - Effect of covariates

Hi and sorry for the long post in advance, I'm doing a survival analysis of lung cancer patients using Python's lifelines package. According to the documentation, the function ...
0
votes
1answer
54 views

How to concatenate two fasta sequences by py

I have three backbone and i want to concatenate 70 sequence into these backbone. such like: fasta file 1: ...
1
vote
1answer
48 views

Is there a Python program that is able to show convergent and divergent evolution on a phylogenetic tree?

I was wondering if there was a Python program that detects convergent and divergent evolution on a tree. I am also curious if it is just better to look at a phylogenetic tree and conclude what is ...
1
vote
1answer
44 views

Is there a simple command for outputting a tab delimited columns?

I am working on a fasta file and am writing my command in nano within command-line and executing using python, also within a command line. My objective is to get my command to provide me with a tab ...
0
votes
2answers
59 views

creating a tab delimited file

I am working on a project using a fasta file. I am writing my command in nano within command-line and executing using python, also within my command-line. I would like my command to provide me with a ...
2
votes
1answer
84 views

How do you currently track bugs in python using freely available software/websites?

I am starting a project using Python to track, archive, assign and manage bioinformatics bugs. This software will be able to be integrated into project management software or stand alone. How do you ...
2
votes
1answer
59 views

cmapPy exception

I'm trying to read gctx files with cmapPy. This is my code: ...
0
votes
0answers
26 views

Opening gctx files

I installed cmapPy but I don't know how to use it to read gctx files. I read the documentation. If anyone knows how to do it with cmapPy or any faster method your help would be greatly appreciated. I ...
1
vote
1answer
174 views

How to predict with the pre-trained DNABERT model?

I was curious to give DNA BERT a try. This is a BERT (Bidirectional Encoder Representations from Transformers) model that was trained on short (k=3,4,5, or 6) k-...
1
vote
1answer
194 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
75 views

Find CRISPR PAM-sites with python

I am a college student and just started bioinformatics. I am trying to write a script (not for school) that finds all potential NGG and TTTN protospacer adjacent motif sequences in a genome string. I ...
0
votes
1answer
160 views

Nonbonded interactions on the GPU

i'm using this command gmx mdrun -deffnm nvt0 -nb gpu but got ...

1
2 3 4 5 6