24
votes
Accepted
Convert a BAM file from one reference to another?
You're the second person I have ever seen using NCBI "chromosome names" (they're more like supercontig IDs). Normally I would point you to a resource providing mappings between chromosome names, but ...
17
votes
Accepted
15
votes
How to convert FASTA to BED
You can do this easily with bioawk, which is a version of awk with added features facilitating bioinformatics:
...
13
votes
How to convert FASTA to BED
It's good practice to have your FASTA indexed, so you can leverage the .fai you are likely to already have. If not, you can just ...
9
votes
Accepted
5'UTR and 3'UTR annotation in yeast
I am unaware of any "official" or gold-standard UTR annotations in S. cerevisiae.
One option is to use the annotations from the TIF-Seq publication (Pelechano et al. 2013).
The ...
8
votes
How to convert BED to GFF3
To answer the question as asked, for people googling.
For BED6, in python:
...
8
votes
Accepted
How to convert BED to GFF3
Galaxy has API and API-consuming libraries (such as BioBlend) that will allow you to interactively script against it without opening the graphical interface at all.
However you can also take almost ...
7
votes
Accepted
How to convert FASTA to BED
We have many excellent answers! This will be an excellent reference for future users.
I found what exactly what I was asking in my question:
https://www.biostars.org/p/191052/
...
7
votes
Accepted
How to release an R package with several bed files?
You can store it in data/ subfolder. If one of your functions need this bed file, you can include importing it in your function.
Here are some examples how to get ...
7
votes
5'UTR and 3'UTR annotation in yeast
I found the following two files in https://downloads.yeastgenome.org/sequence/S288C_reference/:
SGD_all_ORFs_3prime_UTRs.fsa
SGD_all_ORFs_5prime_UTRs.fsa
According to the README files in the same ...
6
votes
How to convert FASTA to BED
You could adapt this awk one-liner. Note that it assumes that sequence IDs are not longer than 100 characters and that there is no description following the sequence ID on the header line.
...
6
votes
Accepted
How to filter out cross alignments from a BED file?
According to the SAM specification, the 3rd field of a SAM line (RNAME) is:
RNAME: Reference sequence NAME of the alignment. If @SQ header lines
are present, ...
6
votes
Accepted
Merging bed records based on name
Although you don't mention it, I'm guessing you're using bedtools v2.26.0. Version 2.26.0 of groupBy has a bug in it, which you've encountered (it was fixed shortly after release, so you'll either ...
6
votes
How to release an R package with several bed files?
As benn said you can store them in data/ subfolder of your package. There is no size limit (AFAIK) but if you plan to publish your package in some repositories they ...
6
votes
Accepted
How can I convert a BED file to GTF/GFF with gene_ids?
Here I provide an ordered list of options (note that I am the author of bed2gtf and bed2gff):
bed2gtf
A high-performance BED-to-...
5
votes
Range overlap python error with genomic regions
You're reinventing bedtools intersect (or bedops), for which there's already a convenient python module:
...
5
votes
Accepted
After artificially creating events in a FASTA file, how do I keep track of the old coordinates?
I've written a handful of programs from scratch to simulate mutations and variations in real or simulated sequences.
The trick has always been to sort the variants by genomic coordinate, apply the ...
5
votes
How to convert BED to GFF3
To convert BAM to GTF, which is the best way to get a file to compare with cuffcompare:
...
5
votes
Parse out exon coordinates from bed file for each gene
There are multiple ways to go about it. On the command line you can make a 1 line BED file:
chr1 11868 12227
And then ...
5
votes
Accepted
5
votes
Accepted
5
votes
Fast filtering of intervals not falling within a certain distance from known genes
Here's a way to use BEDOPS, which was designed to work fast by using sorted input. Other tools now use sorting to accomplish similar performance benefits.
Convert GTF annotations to a sorted BED file ...
5
votes
Fast filtering of intervals not falling within a certain distance from known genes
In one line, using bedtools
...
5
votes
Accepted
How to create a .bed file from .fasta?
Here is a fun little python script I cooked up for the occasion. It will take a standard fasta file as a command-line argument and turn it into the proper bed format. Using your example fasta:
...
5
votes
Accepted
4
votes
How to convert BED to GFF3
Bioconductor makes this so easy. It does the coordinate conversion on import.
...
4
votes
How to obtain .bed file with coordinates of all genes
You can indeed get this information from the UCSC Table Browser. Select knownGene as your primary table, make a filter, add knownCanonical to as a linked table to filter on, then in the free-form ...
4
votes
Merging bed records based on name
You could do this with the CGAT toolkit:
cgat bed2bed --method=merge --merge-by-name -I bed_with_gene_ids.bed
Installing such ...
4
votes
Convert a BAM file from one reference to another?
The "right" solution would be realignment, but that's expensive and most of us would not go that route. My preferred solution would be to convert the bed file, as opposed to the bam. Here's why:
1) ...
4
votes
How to convert FASTA to BED
Here is an approach with BioPython. The with statement ensures both the input and output file handles are closed and a lazy ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bed × 69bedtools × 15
sam × 8
gtf × 7
python × 6
r × 5
format-conversion × 5
shell × 5
fasta × 4
vcf × 4
genome × 4
genomics × 4
ngs × 4
file-formats × 4
ucsc × 4
gff × 4
phylogenetics × 3
samtools × 3
reference-genome × 3
wgs × 3
sequence-annotation × 3
tsv × 3
gene × 2
plink × 2
chip-seq × 2