Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
-1 votes
0 answers
25 views

How can I convert ecat(.v) file to nifti(.nii) file in python?

I want to convert ecat file to nifiti file or ecat file to dicom so I can change it to .nii later. I would like it in python if possible. Do you have any library suggestion? Thank you
user18593's user avatar
2 votes
0 answers
35 views

How to perform liftover from 38 to 37 in R?

I have some gwas summary statistics in GRCh38 that I want to lift to GRCh37. I am trying to liftover in R using this code: ...
DN1's user avatar
  • 45
1 vote
0 answers
30 views

Need help with binding DB API

...
Neeleshwar Pandey's user avatar
0 votes
0 answers
19 views

PyRanges: drop specific record from an object

Given a specific PyRanges object, such as ...
Einar's user avatar
  • 131
1 vote
0 answers
25 views

What are some good miRNA databases?

I am writing a project proposal for my boss and it is on codon usage bias in the dystrophin protein and the spectrin-like repeats found in a hmmscan file using the longest dystrophin isoform protein ...
Rachel Sweeney's user avatar
-1 votes
1 answer
19 views

New to DNABERT confused about kmers input

I'm trying to use DNABERT to predict promoter regions. Right now, I have a df with 500k rows, 1st column is the DNA sequence (all different lengths), 2nd column says "promoter" vs. "non-...
user18482's user avatar
2 votes
1 answer
27 views

retrieving past BLAST requests in bioPython

is there any way to retrieve a BLAST request made using the Biopython library using the request's query_id? Alternatively is it possible to retrieve a query_id before the blast result is complete, and ...
kama's user avatar
  • 21
1 vote
0 answers
18 views

Adding step size to cross validation in Python package lifelines

I'm using the Python package lifelines to build a CoxPH model where I reduce the step size to 0.1, like so: ...
skubali's user avatar
  • 11
2 votes
1 answer
22 views

BioPython SeqIO fails with Invalid Alphabet found

I am trying to store a GenBank file that could be read by Geneious later. I found an example how to create the GenBank file here But now I run into Alphabet issues. ...
El Dude's user avatar
  • 123
1 vote
1 answer
93 views

bcbio run not running samples in parallel

Sorry for the cross post but I'm not getting a response on bcbio github: I'm trying to run bcbio on 20 samples and it's only running one at a time as it steps through the yaml seemingly. I'm using ...
t_creasman's user avatar
0 votes
0 answers
31 views

Error in snakemake when running conda envs in container

I am facing an issue when running snakemake with a container and conda. Let me explain better. I am developing a workflow (locally) in snakemake, where some rules use a conda env (defined in /envs/env....
DavideBrex's user avatar
3 votes
1 answer
558 views

GWAS in python?

A question similar to this has also been asked on Biostars I understand GWAS is done with R, but are any written in Python? I'm used to python and java, acclimating to R will take a bit of time and my ...
Katherine's user avatar
1 vote
0 answers
58 views

SNP How to detect regions of erratic pairwise alignment?

I have clusters of DNA sequences that contain some mutations. All the sequences in a cluster should contain the same mutations. As the mutations aren't known, those clusters of sequences were pairwise-...
Fravadona's user avatar
  • 181
1 vote
2 answers
219 views

ValueError: count not convert string to float

I'm trying to use a Python script to plot with a rolling window using pandas and seaborn. This code worked for the longest time but now it's giving me an error that I don't know how to fix. Here is ...
rimo's user avatar
  • 923
2 votes
2 answers
35 views

Compare files with similar names using placeholders/wildcards in Snakemake

In Snakemake I want to use two input files for comparison. The one file has a sample name (e.g. 526846), with an experimental id (e.g. EF_S13' and 'MF_S5'). The file I want to compare it to has the ...
Dandelion's user avatar
  • 301
3 votes
1 answer
101 views

Generating CIGAR strings for MSA with reference

I have a list containing the results of a MSA: ...
Fravadona's user avatar
  • 181
-1 votes
1 answer
86 views

For loop in Python goes wrong

I have mutation status (0,1) for ten genes in ten cancer 3D models I have also gene expression in these 3D models, like ...
Angel's user avatar
  • 1,981
0 votes
1 answer
141 views

How to pack up a Python script in the form a Dockerfile

I have a simple Python script with this header ...
Angel's user avatar
  • 1,981
0 votes
1 answer
259 views

Looping over a list of cell models in Python

I have two data sets Mutations in 10 genes Gene expression in 18 cancer 3D models For every (mutation, gene) and gene expression pair we run an ANOVA test This is my data ...
Angel's user avatar
  • 1,981
2 votes
1 answer
62 views

How can I develop a snakemake rule for all files in multiple directories?

I am a beginner in snakemake and I'm trying to develop a working flow. Imagine I have multiple folders and in each folder I have a tumour and normal sample files: ...
Anna1364's user avatar
  • 516
1 vote
1 answer
30 views

How to access yeast-cyc in a programmatic way to extract the GO terms?

I am a newbie in Bioinformatics, I want to extract the GO terms from yeast-cyc, which is items in the Go terms tab of this page https://yeast.biocyc.org/gene?orgid=YEAST&id=G3O-29622#tab=GO , not ...
Mountain's user avatar
  • 113
2 votes
1 answer
59 views

Snakemake and github actions

I am working on a snake-make workflow that follows the guidelines of formatting and linting so that it can be published on the official Snake-make repository. Whenever I push my code on GitHub, the ...
DavideBrex's user avatar
4 votes
1 answer
73 views

Can not launch bcftools using python's subprocess module, as it only accepts first command of commands list

I am trying to remove samples from a chromosome vcf file. I wrote a function that takes chromosome number and a list of samples to remove. When I try to run bcftools using subprocess module it only ...
YKY's user avatar
  • 171
-1 votes
1 answer
37 views

Feature-selection microbiome data to build a model to predict cancer

I want to build a machine learning model to predict colorectal cancer based on 16S rRNA microbiome data (stool samples). I have filtered the data using filtering approach by Duvallet(removing samples ...
user17818805's user avatar
3 votes
0 answers
50 views

Issue creating CNV plot from WES data

I received Whole Exome Sequencing data from an NGS company (CARIS, specifically). I received R1 and R2 FASTQ files, a BAM file aligned to hg38, and a VCF file. I used CNVPytor to create a CNV plot (...
InterestingQuestions44's user avatar
0 votes
1 answer
28 views

Invalid tag name: "1KG" and Invalid character '/' in 'SA' FORMAT field at chr1:6197766

I have a VCF file that is of the following format: ...
InterestingQuestions44's user avatar
0 votes
2 answers
38 views

Filtering cohorts in PySpark returns Py4JJavaError

I'm working with UK Biobank data. I made a cohort with the Cohort Browser and tried to extract the data with this code ...
eclarette's user avatar
1 vote
1 answer
27 views

Sql query slow on Chembl postgres database

Doing complex sql query on Chembl database and it takes 40 minutes on the machine from lab. I was thinking using dask, extract each table and export to parquet, when do the data processing . Is this a ...
Jack2501's user avatar
1 vote
2 answers
216 views

selenium webdriver is stuck after downloading and saving a pdf file from pubmed central website

I'm trying to download pdf from pubmed central using selenium webdriver in python. The code is provided below which downloads the pdf fine but, it does not quit automatically. i.e. it is sort of stuck ...
Wasim Aftab's user avatar
0 votes
0 answers
19 views

Compare in Python / PyRanges two genomic intervals to determine whether they're separate, partially overlapping, or contained

As part of a larger analysis, I need to evaluate pairs of genomic regions (regionsA and regionsB) and perform different ...
Einar's user avatar
  • 131
1 vote
2 answers
33 views

Getting rid of duplicates in a dictionary

I have a tsv file that lists the reads and read lengths from a FASTA file but some reads are duplicated - that's just from the analysis I did previously - but I want to only take one instance of the ...
rimo's user avatar
  • 923
0 votes
0 answers
81 views

Gene Ontology (GO) analysis and classification of bacterial whole genome annotations

I am new to Gene Ontology (GO) analysis and would like to classify and visualize the annotations. Here is the background and the steps I have taken so far: I annotated the bacterial whole genome ...
Umar's user avatar
  • 135
1 vote
3 answers
243 views

How to join multiple large .tsv (> 20 GB, bed file) files by two identifier?

This question has also been asked on Biostars I wonder how can I join multiple large .tsv files (over 20 GB each) by using two identifiers (columns) which I used to do using the ...
Deb's user avatar
  • 65
1 vote
1 answer
47 views

how to search and calculate occurence of certain word (like TAA) in fastafile

...
tonu's user avatar
  • 11
0 votes
1 answer
29 views

Variant Filtering Using AnthonyOzerov/variant-filtering Github Repository And Python Errors

I am using the following Github repository that I cloned. One apparent issue is that it is using an old/defunct link for the phenotype_to_genes.txt that is no longer active and after several tries I ...
Indira's user avatar
  • 380
0 votes
1 answer
89 views

How to calculate the variant allelic fraction (VAF) from VEP output?

This question was also asked on Biostars How can I calculate the variant allelic fraction from the VEP file for multiple human samples? I used the ensembl-vep and it is human data.
Joman's user avatar
  • 39
0 votes
1 answer
176 views

Refactoring pandas using an iterator via chunksize

This question was also asked on Stack Overflow Bioinformatics rationale eggNOG files can be very big and sump all available RAM for regular to medium sized desktops. I am looking for advice on using ...
M__'s user avatar
  • 11.9k
2 votes
1 answer
57 views

Assign score to PyRanges from another PyRanges object

I have two PyRanges objects. PR1 is a set of regions of interest across a chromosome, PR2 tiles the genome and has a score associated with each range. I need a way to get for each range in PR1 its ...
Whitehot's user avatar
  • 300
2 votes
1 answer
228 views

Error while running computeMatrix command in Deeptools

I am trying to get computeMatrix for bigwig file in specific genomic region using deeptools. Below is the code I am using ...
Abhinav Soni's user avatar
1 vote
1 answer
49 views

Generating 3D cartesian coordinates of a peptide and computing van der Waal interactions (1-4 atoms) for a given set of dihedral angles?

I wanted to generate 3D Cartesian coordinates of a peptide sequence for fixed bond lengths and bond angles for a given set of backbone dihedral angles and side dihedral angles. I also wanted to ...
vigneshwaran kannan's user avatar
1 vote
1 answer
41 views

Tidying MEGAN Taxonomy for Python/R Analysis

I am analysing some WGS data in MEGAN and would like to do some additional analysis in Python/R I am having trouble Tidying the Taxonomic data in a format which would be conducive to this. Originally ...
dunc4n's user avatar
  • 35
1 vote
0 answers
91 views

How to use hashsolo for demultiplexing hashtags?

I am trying to use hashsolo and I want to make sure that I have done things correctly. I did the below: ...
pythonbeginner's user avatar
0 votes
0 answers
8 views

Is there available REGA or COMET versions for downloading & using on a local machine?

I am currently working on verifying the subgenotyping of our sequences and a subsample from the Los Alamos NL database. My supervisor has recommended using REGA & COMET for this purpose. While our ...
Vovin's user avatar
  • 435
1 vote
0 answers
29 views

GDC API: Obtain the Objective Power (or Magnification) of a WSI file

I've been trying to find out a way to retrieve the Objective Power (or Magnification) of a Whole Slide Image file without downloading it first. I've seen that some WSI's Objective power might be 40x ...
Martim Afonso's user avatar
-2 votes
1 answer
296 views

How to calculate Allele frequency from vcf file

Organism under investigation is Plasmodium falciparum. How to calculate the allele frequency for each row? I tried with this code: ...
skr3178's user avatar
1 vote
1 answer
23 views

How to get enriched pathways in the data using continous statistic measure?

I was doing pathway enrichment analysis using the below code ...
Megha's user avatar
  • 395
2 votes
4 answers
562 views

Parallelize or qsub a bash script

I have a bash script that I would like to parellelize to run on multiple nodes. My goal is to run my python sample_script.py script on pairwise comparisons of samples to see if their variants are a ...
che625's user avatar
  • 21
1 vote
1 answer
64 views

Analysing the Effect of a Drug on the Morphological Changes of a Cell Type

We came across a project in our lab that no one exactly knows how to approach. Since, I know a little bit of Python programming, this project was assigned to me. There is a data from a randomised ...
eh329's user avatar
  • 41
-3 votes
1 answer
108 views

Histogram plot using R/python with two variables[BC and Control] and their corresponding gene names

How do we plot histogram in R\Python with two variables[BC and Control] and their corresponding gene names examples is below: Thank you,
Mahendra Singh's user avatar
3 votes
1 answer
128 views

Download all pubmed central article ids that have a keyword appearing in their titles/abstracts and also falling between two dates

I am using the following code to download all pubmed central article ids that have a keyword appearing in their titles/abstracts and also falling between two dates. The code seems to work when I ...
Wasim Aftab's user avatar

1
2 3 4 5
12