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
Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?
Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating...-
Channel: Articles
10-14-2026, 09:55 AM -
-
by SEQadmin2
Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.
We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing...-
Channel: Articles
-
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 10-22-2026, 11:13 AM
|
0 responses
27 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 11:13 AM
|
||
|
Started by SEQadmin2, 10-22-2026, 10:48 AM
|
0 responses
20 views
0 reactions
|
Last Post
by SEQadmin2
10-22-2026, 10:48 AM
|
||
|
Started by SEQadmin2, 10-15-2026, 10:52 AM
|
0 responses
36 views
0 reactions
|
Last Post
by SEQadmin2
10-15-2026, 10:52 AM
|
||
|
Started by SEQadmin2, 10-14-2026, 05:39 AM
|
0 responses
43 views
0 reactions
|
Last Post
by SEQadmin2
10-14-2026, 05:39 AM
|
Leave a comment: