Skip to content

Instantly share code, notes, and snippets.

Test

@sahrendt0
sahrendt0 / hw8.pl
Created November 28, 2012 01:38
GEN 220 Week 8
#!/usr/bin/perl
# Script: hw8.pl
# Description: Trim adapter, clean reads
# Author: Steven Ahrendt
# email: sahre001@ucr.edu
##################################
# Adapter: CTGTAGGCACCATCAAT
# trim if it contains a perfect match to first 6 bases
##################################
@sahrendt0
sahrendt0 / blast_parse.pl
Created October 31, 2012 09:15
GEN 220 Week 5
#!/usr/bin/perl
# Script: blast_parse.pl
# Description: GEN220, week 5, problem 4
# Author: Steven Ahrendt
# email: sahre001@ucr.edu
#####################################
## QUERY HIT EVAL LENGTH IDENT QSTART QEND HSTART HEND
############################################################
use strict;
use warnings;
@sahrendt0
sahrendt0 / Temperature.pm
Created October 24, 2012 06:37
GEN 220 Problem Set 4
package Temperature;
use strict; use warnings;
sub f2c {
my $f = shift;
my $c = ($f - 32)*(5/9);
return $c;
}
sub c2f {
my $c = shift;
@sahrendt0
sahrendt0 / ps3q4.pl
Created October 17, 2012 06:22
GEN 220 Problem Set 3
#!/usr/bin/perl
use strict;
use warnings;
my $infile = shift;
my $num_utr3 = 0;
my (%GFF,%data,$ID,$gene_length,@exon,$gene_stop,$gene_start);
my($ex_start,$ex_stop,$ex_length);
@sahrendt0
sahrendt0 / ps2a.pl
Created October 9, 2012 22:01
GEN 220 Problem Set 2
#!/usr/bin/perl -w
# Script: ps2a.pl
# Description: GEN220 homework set 2, questions 1-4
# Author: Steven Ahrendt
# email: sahre001@ucr.edu
# Due: 10.9.12
##############################
# [x]: Q1 (length of sequence & num of codons)
# [x]: Q2 (first start codon & length of 5' UTR)
# [x]: Q3 (first stop codon)