Originally posted by maubp
View Post
Unconfigured Ad
Collapse
X
-
Actually, I do more wet lab most of the time. Sometimes, I'll also do simple small rna analysis with ready-to-use perl script and simple shell script. It's enough most of the time with my work, but sometime it's not easy for me.
-
Seems these script also deal with a list of ids, then using these ids to fetch sequences in a fasta file. I wanna use sequences directly and get a subset of fasta from a big fasta file base on provided sequences. Thank you for your information as well.
Originally posted by maubp View PostHere are my Python scripts to do this, with Galaxy wrappers:
This filters the FASTA file (loads all the IDs, then goes through the FASTA file once):
Galaxy tools and wrappers for sequence analysis. Contribute to peterjc/pico_galaxy development by creating an account on GitHub.
This indexes the FASTA file, then goes through the IDs one by one:
Galaxy tools and wrappers for sequence analysis. Contribute to peterjc/pico_galaxy development by creating an account on GitHub.
The difference is which order do you want? The order in the FASTA file (faster), or the order in the ID file (slower).
Leave a comment:
-
Here are my Python scripts to do this, with Galaxy wrappers:
This filters the FASTA file (loads all the IDs, then goes through the FASTA file once):
Galaxy tools and wrappers for sequence analysis. Contribute to peterjc/pico_galaxy development by creating an account on GitHub.
This indexes the FASTA file, then goes through the IDs one by one:
Galaxy tools and wrappers for sequence analysis. Contribute to peterjc/pico_galaxy development by creating an account on GitHub.
The difference is which order do you want? The order in the FASTA file (faster), or the order in the ID file (slower).
Leave a comment:
-
Actually, I do prefer command based under shell environment. grep seems a great way to do it, thanks for tips.
Originally posted by cmbetts View PostThere's almost certainly lots of ways to do this depending on what tools you're comfortable with.
In R/Bioconductor, you could read in the fasta using the bioconductor ShortRead package, and then use vcountPattern to identify the hits to your query sequences and write those as a new fasta file.
It's been a long time since I used it, but BioPython also has some nice iterators for going through fasta files, and would be better suited for a bigger fasta file. You would essentially write a little loop that iterates through the fasta and queries each record for your desired sequence. If it finds the sequence, write the record to a new file, otherwise move on to the next record.
I'm sure some folks might have some grep based methods for the commandline as well
Leave a comment:
-
3xs for the info.
Originally posted by Brian Bushnell View PostYou can extract sequences that share kmers with your sequences with BBDuk:
This will print to C all the sequences in A that share 100% of their 31-mers with sequences in B.Code:bbduk.sh in=a.fa ref=b.fa out=c.fa mkf=1 mm=f k=31
You can also do something more precise with Dedupe, as it allows arbitrary set operations; so, let me know if the above method is insufficient.
Leave a comment:
-
There's almost certainly lots of ways to do this depending on what tools you're comfortable with.
In R/Bioconductor, you could read in the fasta using the bioconductor ShortRead package, and then use vcountPattern to identify the hits to your query sequences and write those as a new fasta file.
It's been a long time since I used it, but BioPython also has some nice iterators for going through fasta files, and would be better suited for a bigger fasta file. You would essentially write a little loop that iterates through the fasta and queries each record for your desired sequence. If it finds the sequence, write the record to a new file, otherwise move on to the next record.
I'm sure some folks might have some grep based methods for the commandline as well
Leave a comment:
-
You can extract sequences that share kmers with your sequences with BBDuk:
This will print to C all the sequences in A that share 100% of their 31-mers with sequences in B.Code:bbduk.sh in=a.fa ref=b.fa out=c.fa mkf=1 mm=f k=31
You can also do something more precise with Dedupe, as it allows arbitrary set operations; so, let me know if the above method is insufficient.
Leave a comment:
-
Extract multiple fasta sequences from a fasta file based on sequenes
I've searched in the forum and google as well, but most of cases are extract sequences from fasta file based on id list. but now I only have several sequences without ids and i want to extract from a fasta file based on these sequences, does anyone have clues for it? Actually, that means I need the sequences identifier (or id) from the fasta file.
Thank you very much for your help.Tags: None
Latest Articles
Collapse
-
by SEQadmin2
CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).
Despite this, “CRISPR helped turn genome editing from a specialized technique into...-
Channel: Articles
07-31-2026, 11:01 AM -
-
by SEQadmin2
Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.
The systematic characterization of the human proteome has...-
Channel: Articles
07-20-2026, 11:48 AM -
-
by SEQadmin2
Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
...-
Channel: Articles
07-09-2026, 11:10 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 08-03-2026, 10:13 AM
|
0 responses
15 views
0 reactions
|
Last Post
by SEQadmin2
08-03-2026, 10:13 AM
|
||
|
Started by SEQadmin2, 07-31-2026, 02:55 AM
|
0 responses
32 views
0 reactions
|
Last Post
by SEQadmin2
07-31-2026, 02:55 AM
|
||
|
Started by SEQadmin2, 07-24-2026, 12:17 PM
|
0 responses
23 views
0 reactions
|
Last Post
by SEQadmin2
07-24-2026, 12:17 PM
|
||
|
Started by SEQadmin2, 07-23-2026, 11:41 AM
|
0 responses
21 views
0 reactions
|
Last Post
by SEQadmin2
07-23-2026, 11:41 AM
|
Leave a comment: