90 likes | 169 Views
Learn about Perl's @INC array, which contains directories for loading modules. See how Perl searches for modules within @INC and how to specify file paths if not found in these directories.
E N D
Supplement 1: What is @INC? The @INC is an array that contains a list of directories Perl searches when attempting to load modules. To display the current contents of the @INC array: perl -e 'print join "\n", @INC‘ or perl -V the equivalent to the shell's PATH variable When you use a module in your code, for example Use Getopt::Std; Perl gets a list of directories from the @INC variable and searches them for Getopt::Std module it is requested to load. If the file that you want to load is not located in one of the listed directories, then you have to tell Perl where to find the file. You can either provide a path relative to one of the directories in @INC, or you can provide the full path to the file.
#!/usr/bin/perl BEGIN { unshift (@INC,"/usr/local/biobin"); # Add the modules stored to the @INC } use Oligo_biobin; if (@ARGV < 1) { die "Usage: $0 <tbl_file> Tbl_file: OligoidOligosequence“ ;} ( $oligofile ) = @ARGV; open (TBL,"$oligofile") || die "Can't open $oligofile"; while (<TBL>) { chomp; $temp = $_; @line = split "\t",$_; print "$line[0]\t$line[1]\t"; print sprintf "%5.1f\n",&calc_tm($line[1]);
Supplemental 2: What is <>? #! /usr/bin/perl while (<>) { print $_; } Perl diamond.pl file1.txt file2.txt Diamond operator reads each line of file1.txt then followed by each line of file2.txt
Supplemental 3. Some Basic Biological knowledge: chromosome and DNA
Compaction efficiency = 6 fold x 40 fold x 700 fold 15-18 loops 1200 kb DNA Nucleosomes Each loop 180-300 nucleosomes, 50-70 kbDNA Scaffold 30 nm solenoid Supplemental 3. What
open chromatin promoter enhancer gene compact chromatin (transcribed enhancer region) LCR (regulated) MAR MAR MAR LCR nuclear scaffold J. Bode / E. Wingender 1993 insulator
Chromosome: how long is it? Human chromosome 1: 250 million base pairs (bp) ATCGCGATTGCCATGCCGATCGGTAAACT… The other strand is implied: ATCGCGATTGCCATGCCGATCGGTAAACT… TCGCGCTAACGGTACGGCTAGCCATTTGA… Human genome sequence: 24 chromosome: 3,101,788,170 bp 3 G if loaded into computer memory One base pair
Genome Sequences of various species: ftp://ftp.ncbi.nih.gov/genomes/ Conception of gene Transcription Promoter 5’UTR Exon1 Intron1 Exon2 Intron2 Exon3 3’UTR Pre-mRNA Mature mRNA 5’UTR Exon1 Intron1 Exon2 Intron2 Exon3 3’UTR 5’UTR Exon1 Exon2 Exon3 3’UTR Translation Protein
DNA sequence format Fasta > Chr1 ATCGAATGCTGA… >Chr2 TTGACTCTGATG… Table format (for perlmaniulation) Chr1 ATCGAATGCTGA … Chr2 TTGACTCTGATG…