Larry Moran has an excellent discussion of the organization of rRNA genes in the human genome. It's an old post, but a good one.
If you're involved in RNA-Seq, you should read it. Dr. Moran's discussion makes it clear why it is necessary to map reads to a synthetic rRNA-ome before doing full-genome alignment -- if you want to accurately count, or filter out, rRNA reads (which can predominate in RNA-seq datasets).
Thursday, February 16, 2012
Thursday, February 2, 2012
get rid of dashboard in mac os X
Dashboard seems like a good idea, but I can't stand how it always seems to take 5 seconds to "wake up" all those widgets whenever I open it up. So, as a result, I never use it. It just idles there in the background taking up a sliver of CPU cycles. Oh and occasionally I accidentally key into it. So, I am glad I finally did this:
defaults write com.apple.dashboard mcx-disabled -boolean YESkillall Dock
Tuesday, December 20, 2011
rRNA genes in human genome
GRCh37/hg19
http://sandwalk.blogspot.com/2008/01/human-ribosomal-rna-genes.html
Wednesday, October 26, 2011
Monday, October 3, 2011
Length filter for fastq files
I wanted to remove all sequences less than n long from a fastq file. This is a solution that uses sed "paragraphs" -- see my earlier post. It works... could probably be done more efficiently... but this works for me, for now.
Save this as a script, and then use in this manner:
./fastqlenfilt.sh 15 input.fastq >output.filtered.fastq
Save this as a script, and then use in this manner:
./fastqlenfilt.sh 15 input.fastq >output.filtered.fastq
#!/bin/sh
sed -n '
# thanks to http://www.grymoire.com/Unix/Sed.html
#
# if matching description, check the paragraph
/^@/ b para
# else add it to the hold buffer
H
# at end of file, check paragraph
$ b para
# now branch to end of script
b
# this is where a paragraph is checked for the pattern
:para
# return the entire paragraph
# into the pattern space
x
# look for the pattern, if there - print
# /'.*\n.{$1,}'/ p
/'.*\\n[ACGTURYKMSWBDHVNX]\\{$1,\\}'/ p
' $2
Thursday, September 22, 2011
Mac function keys working with debian / ubuntu terminal and byobu
A minor irritation, but as I have begun running longer jobs, and getting addicted to the excellent byobu adaptation of GNU screen, I've been frustrated that I can't access those easy function keys when I ssh in from my Mac.
I've pieced together a solution by reading this thread and this excellent resource.
Here is what works for me, using OS X 10.6, with Terminal declaring itself as "xterm-color": in Terminal.app, go to preferences, and replace the F1 thru F4 mappings to:
EDIT: Now I am using OS X 10.7, and my terminal is set to declare "xterm-256color", and what works for me now is the following:
Where 33 is a <ctrl>[
I've pieced together a solution by reading this thread and this excellent resource.
Here is what works for me, using OS X 10.6, with Terminal declaring itself as "xterm-color": in Terminal.app, go to preferences, and replace the F1 thru F4 mappings to:
33[11~ 33[12~ 33[13~ 33[14~
EDIT: Now I am using OS X 10.7, and my terminal is set to declare "xterm-256color", and what works for me now is the following:
33OP 33OQ 33OR 33OS
Where 33 is a <ctrl>[
Tuesday, September 13, 2011
Pull desired sequences out of a multiple FASTA file with regex pattern match
This simple problem stumped me for a while.
In other words, you want just these sequences:
I knew I could do it with a script, using if/then/else testing. I know some people would say I should make use of BioPerl Bio::SeqIO module. But I wanted to do it in the bash shell, for the sake of simplicity and learning a little more advanced usage of the amazing text and regex tools available in almost any vanilla linux distro.
This posting from Austin Matzko's blog looked really useful, but ultimately The Grymoire awed me with its comprehensiveness and clarity, in this case, for all things sed.
I made a slight modification of the supplied example (see the "Working with Multiple Lines" section) and I came up with a one-line solution:
But it is probably better read as a script:
Say you want just the human sequences ("hsa") from the following multiple FASTA file:
>cel-mir-90 MI0000059 Caenorhabditis elegans miR-90 stem-loop
GGGCGCCAUUUCGAGCGGCUUUCAACGACGAUAUCAACCGACAACUCACACUUUUGCGUG
UUGAUAUGUUGUUUGAAUGCCCCUUGAAUUGGAUGCCA
>hsa-let-7a-1 MI0000060 Homo sapiens let-7a-1 stem-loop
UGGGAUGAGGUAGUAGGUUGUAUAGUUUUAGGGUCACACCCACCACUGGGAGAUAACUAU
ACAAUCUACUGUCUUUCCUA
>hsa-let-7a-2 MI0000061 Homo sapiens let-7a-2 stem-loop
AGGUUGAGGUAGUAGGUUGUAUAGUUUAGAAUUACAUCAAGGGAGAUAACUGUACAGCCU
CCUAGCUUUCCU
>dme-mir-13b-2 MI0000135 Drosophila melanogaster miR-13b-2 stem-loop
UAUUAACGCGUCAAAAUGACUGUGAGCUAUGUGGAUUUGACUUCAUAUCACAGCCAUUUU
GACGAGUUUG
>dme-mir-14 MI0000136 Drosophila melanogaster miR-14 stem-loop
UGUGGGAGCGAGACGGGGACUCACUGUGCUUAUUAAAUAGUCAGUCUUUUUCUCUCUCCU
AUA
>mmu-let-7g MI0000137 Mus musculus let-7g stem-loop
CCAGGCUGAGGUAGUAGUUUGUACAGUUUGAGGGUCUAUGAUACCACCCGGUACAGGAGA
UAACUGUACAGGCCACUGCCUUGCCAGG
>hsa-mir-30d MI0000255 Homo sapiens miR-30d stem-loop
GUUGUUGUAAACAUCCCCGACUGGAAGCUGUAAGACACAGCUAAGCUUUCAGUCAGAUGU
UUGCUGCUAC
>mmu-mir-122 MI0000256 Mus musculus miR-122 stem-loop
AGCUGUGGAGUGUGACAAUGGUGUUUGUGUCCAAACCAUCAAACGCCAUUAUCACACUAA
AUAGCU
In other words, you want just these sequences:
>hsa-let-7a-1 MI0000060 Homo sapiens let-7a-1 stem-loop
UGGGAUGAGGUAGUAGGUUGUAUAGUUUUAGGGUCACACCCACCACUGGGAGAUAACUAU
ACAAUCUACUGUCUUUCCUA
>hsa-let-7a-2 MI0000061 Homo sapiens let-7a-2 stem-loop
AGGUUGAGGUAGUAGGUUGUAUAGUUUAGAAUUACAUCAAGGGAGAUAACUGUACAGCCU
CCUAGCUUUCCU
>hsa-mir-30d MI0000255 Homo sapiens miR-30d stem-loop
GUUGUUGUAAACAUCCCCGACUGGAAGCUGUAAGACACAGCUAAGCUUUCAGUCAGAUGU
UUGCUGCUAC
I knew I could do it with a script, using if/then/else testing. I know some people would say I should make use of BioPerl Bio::SeqIO module. But I wanted to do it in the bash shell, for the sake of simplicity and learning a little more advanced usage of the amazing text and regex tools available in almost any vanilla linux distro.
This posting from Austin Matzko's blog looked really useful, but ultimately The Grymoire awed me with its comprehensiveness and clarity, in this case, for all things sed.
I made a slight modification of the supplied example (see the "Working with Multiple Lines" section) and I came up with a one-line solution:
sed -n '/^>/ b para; H; $ b para; b; :para; x; /'hsa'/ p' inputfile.fasta
But it is probably better read as a script:
#!/bin/sh
sed -n '
# thanks to http://www.grymoire.com/Unix/Sed.html
#
# if matching description, check the paragraph
/^>/ b para
# else add it to the hold buffer
H
# at end of file, check paragraph
$ b para
# now branch to end of script
b
# this is where a paragraph is checked for the pattern
:para
# return the entire paragraph
# into the pattern space
x
# look for the pattern, if there - print
/'$1'/ p
' $2
Subscribe to:
Posts (Atom)