Range extractor DNA
Cuts out the positions you name, 1-based and inclusive, or trims a fixed number of residues off each end.
Cuts out the positions you name, 1-based and inclusive, or trims a fixed number of residues off each end.
Paste a sequence or a whole FASTA file, write the positions you want, and the pieces come back as FASTA with their coordinates in the header. Ranges may overlap, may be repeated, and are extracted in the order you write them, so the same field also reorders pieces. Every record in the input is cut with the same ranges.
Coordinates are 1-based and inclusive. The first residue is 1, and both ends are part of the range:
That is the convention of GenBank, EMBL, GFF and the position numbers printed in papers. BED files and Python slices count from 0 and leave the last position out, so BED 0-100 and 1-100 here are the same 100 residues.
A range that runs past the end is cut at the last residue and reported. One that starts past the end is dropped, and one written backwards is reported rather than turned around.
"Try an example" loads the first 240 nt of the EGFP coding sequence with the default ranges 1-60, 100-150. The result is two records: the first is 60 nt(60 − 1 + 1) and the second is 51 nt (150 − 100 + 1), 111 nt in all. Switch Output to "Join into one" and the same 111 nt come back as a single record headed1-60,100-150.
Set "What to do" to Trim ends and give the number of residues to remove from the start and from the end of every record. Trimming 10 and 10 from a 240 nt sequence keeps positions11–230, that is 220 nt, and the header of the result says so. It is the same cut as extracting 11-230, written the way read trimming is usually specified.
Trimming by a fixed length is for known offsets, such as a primer tail or a fixed barcode. It does not look for adapter sequence and does not use quality scores, so for real read cleaning use a tool such as cutadapt or fastp. To remove gaps and stray characters instead, use thegap cleaner or the FASTA cleaner.
After cutting, take the other strand withreverse complement, check what you kept withsequence length orsequence statistics, or paste several pieces together withcombine FASTA.
Yes. The first residue is 1 and both ends belong to the range, so 1-100 is the first 100 residues and 250-300 is 51 residues, not 50. These are the coordinates GenBank, EMBL, GFF, VCF and most papers use. BED files and Python slices are the exception: they start at 0 and leave the end out, so a BED interval 0-100 is the same as 1-100 here.
Separate them with commas: 1-100, 250-300, 512. A single number takes that one position. You can also write 1..100 or 1:100, and use the words start and end, as in 250-end. Ranges are extracted in the order you write them, which is how you reorder pieces, and they may overlap.
It is cut at the last residue and the result says so. A range that starts beyond the end of the sequence is dropped with a note, and a range written backwards, such as 300-250, is reported rather than quietly swapped. Ranges are applied to every record separately, so end means that record’s last residue.
It removes a fixed number of residues from the start and from the end of every record, which is the usual way to cut a known adapter length or a low-quality stretch off a read. It is the same operation as extracting the range from trim + 1 to length − trim, and the header of each result records the coordinates that were kept.
Yes. Every record is cut with the same ranges and keeps its name, with the coordinates added, so a set of sequences can be cut to the same region in one step. Choose "Join into one" to concatenate the pieces of each record instead, which is how a coding sequence is assembled from exon coordinates.