Summary of Perl Scripts

crashclappergapΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 7 μήνες)

97 εμφανίσεις

Perl Scripts


Bai_parser.pl



This script takes a blast output in default format (no

m value used in blast) and outputs the
n

top hits (numhits) for each contig.

Usage:
perl Bai_parser.pl infile numhits outfile


Bai_parser_mod.pl



This s
cript is a modification of Bai_parser.pl. It does the same thing but outputs a smaller
number of fields. Usage: same as Bai_parser.pl.

Fields output: Contig_ID

Accession_number_of_hit hit_description


E_value


calc_FPKM_ratios.pl



This s
cript calculates the FPKM ratios of two samples for each contig.

Usage:
perl calc_FPKM_ratios.pl infile > outfile



infile has 5 columns:


Contig_ID Counts(1) Counts(2) FPKM(1) FPKM(2)

where the number in parentheses indicates the sample.


outfi
le has 2 columns:


Counts(1) FPKM(2)/FPKM(1)

This script is useful for determining whether contigs in sample 2 are downregulated
compared to sample 1.


collapse_FPKM.pl




This script sums counts (number of hits) and FPKM’
s over isoforms of the same contig.

Usage:
perl collapse_FPKM.pl infile > outfile

infile has 5 columns:


Contig_ID Counts(1) Counts(2) FPKM(1) FPKM(2)

outfile has same five columns


get_Fasta_stats.pl



Gets and displays statistics on

a Fasta file.

Usage:
perl get_Fasta_stats fastafile > outfile

NOTE: redirect to outfile because it will print a lot on screen. To see actual stats,

issue the unix command
tail

30 outfile








get_FPKM_counts.pl


Extracts counts and FPKM da
ta from FPKM file for contigs listed in an index file.

Usage:
perl
get_FPKM_counts.pl FPKMfile Indexfile outfile

FPKMfile has 5 columns (see
collapse_FPKM.pl

above).

Indexfile has 1 column. Each entry is the Contig_ID of a contig you want to extract

the
information for. NOTE: the Contig_ID’s in the FPKMfile and the Indexfile must be in the
same format.

outfile will have the same 5 columns as the FPKMfile


get_lines.pl


Extracts lines from a file using an index file.

Usage:
perl get_lines.pl infile
indexfile outfile

infile
is the input file to be extracted from. The first column in this file must


correspond to the first column in the
indexfile

indexfile

is the index file; it should have one column. This column contains character

data (edit Contig_
ID)

outfile

will have the same columns as
infile




get_lines
2
.pl


Extracts lines from a file using an index file.

Usage:
perl get_lines.pl infile indexfile outfile

infile
is the input file to be extracted from. The first and second columns in this file

must


correspond to the first two columns in the
indexfile

indexfile

is the index file; it should have two columns. The first column gives contig


ID’s, the second colum is numeric (e.g. position number for SNP)

outfile

will have the same columns as
infi
le



get_Seqs_Fasta.pl


Extracts sequences from a Fasta file based on an index of file names

Usage:
perl get_Seqs_Fasta.pl Indexfile Fastafile > outfile

Indexfile has a single column of names that match sequence names in Fastafile


merge2.pl


Merges two
FPKM files.

Usage:
perl merge2.pl FPKMfile1 FPKMfile2 outfile

outfile has 5 columns:


Contig_ID Counts(1) FPKM(1) Counts(2) FPKM(2) where


the numbers in parentheses indicate which FPKMfile the column is from

NOTE: the two FPKM files must have

identical and sorted values of Contig_ID


rearrange_columns.pl


Rearranges columns in merged FPKM files

Usage
: perl rearrange_columns.pl infile > outfile

infile is produced by merge2.pl.

outfile has 5 columns:


Contig_ID Counts(1) Counts(2) FPK
M(1) FPKM(2) where


reduce.pl


Eliminates duplicate lines from file

Usage
: perl reduce.pl infile > outfile


spaces_to_tabs.pl


Converts space
-
separated columns to tab
-
separated columns in a file

Usage:
perl spaces_to_tabs.pl infile outfile

Note: if ther
e are multiple spaces separating two columns, they are replaced by just one tab