trouble using MAnorm (R version) to compare sample peaks
1
2
Entering edit mode
10.5 years ago
ivoryec ▴ 70

Hi,

I want to compare the peaks from two separate chip seq samples.

I'm trying to use MAnorm (R version) on a MacOS unix command line, but I'm having trouble.

Now the program runs through "step1" without any errors, but it doesn't seem to be making a pair of essential files: peak1.bed and peak2.bed, so all downstream steps fail.

Below, please see the head of each of my test files, and the command I ran.

If you've used this tool before, do you have any idea why I'm having problems?

Thanks very much,

$ head t.*
==> t.TreatedPeaks.bed <==
1    1360    3306
1    13366    13931
1    16606    16934
1    20161    21424
1    59752    60275
1    63673    64105
1    67355    67885
1    68243    68654
1    107683    109178
1    116034    117502

==> t.controlPeaks.bed <==
1    20618    21401
1    37881    38291
1    54003    54374
1    57362    59025
1    67346    67844
1    75598    76127
1    76181    76562
1    110638    111047
1    112394    112668
1    117123    117842

==> t.controlReads.bed <==
1    2    52    -
1    11    61    -
1    32    82    -
1    32    82    -
1    32    82    -
1    32    82    -
1    37    87    +
1    37    87    -
1    47    97    -
1    62    112    -

==> t.treatedReads.bed <==
1    1    51    +
1    13    63    +
1    28    78    -
1    31    81    -
1    44    94    +
1    46    96    +
1    64    114    +
1    69    119    +
1    70    120    -
1    77    127    +

$ MAnorm.sh t.TreatedPeaks.bed t.controlPeaks.bed t.treatedReads.bed t.controlReads.bed 266 275
StepI: clean input
StepII: classify common or unique peaks
Error: Unable to open file peak1.bed. Exiting.
Error: Unable to open file peak2.bed. Exiting.
Error: Unable to open file peak1.bed. Exiting.
Error: Unable to open file peak2.bed. Exiting.
StepIII: count peak read
Error: The requested file (read1.bed) could not be opened. Error message: (No such file or directory). Exiting!

Here is the usage section of the readme.txt that comes with the MAnorm:

Usage:

I. Create a folder and place in the folder MAnorm.sh, MAnorm.r, and all 4 bed files (peak file and read file for the 2 samples under comparison) to be analyzed.

II. run command: ./MAnorm.sh sample1_peakfile[BED] sample2_peakfile[BED] sample1_readfile[BED] sample2_readfile[BED] sample1_readshift_lentgh[INT] sample2_readshift_length[INT]

ExampleCommand:

./MAnorm.sh sample1_peaks.bed sample2_peaks.bed sample1_read.bed sample2_read.bed 150 150                                                                                                                    

The first 4 parameters should be input files in bed format with no header lines
The first 2 files have ONLY 3 columns: chromosome, start, end.
The next 2 files should have 4 columns: chromosome, start, end, strand (+/-)

The last 2 parameters are the number of bp to be shifted for each read. These two parameters are found from MACS peak file *_peaks.xls after "# d =".

ChIP-Seq MAnorm • 4.3k views
ADD COMMENT
2
Entering edit mode
10.5 years ago

If you look at the shell script, you'll see that it's expecting UCSC chromosome names (i.e., they need to start with "chr"). So just quickly fix that and things should work.

ADD COMMENT
1
Entering edit mode

Thanks for reply! That is the format I had earlier, (and I changed it back to double check), and it gave this error:

StepI: clean input
awk: illegal field $(chr1), name "1"
 input record number 1, file
 source line number 2

StepII: classify common or unique peaks
Error: Unable to open file peak2.bed. Exiting.
Error: Unable to open file peak2.bed. Exiting.
Error: Unable to open file peak2.bed. Exiting.
Error: Unable to open file peak2.bed. Exiting.
StepIII: count peak read
cat: common_peak1_count_read1: No such file or directory
...

This made me think that I was using the wrong sort of names for the chromosomes. On the upside, this way it does at least make the peak1.bed file, but still no peak2.bed, and I don't know how to remedy the error its reporting for stepI. On another post, it looked like someone was using integers for chromosome names so I thought that was the answer... apparently not.

ADD REPLY
2
Entering edit mode

Ah, after trying things out a bit, the problem is an error on line 14 of MAnorm.sh. The line currently is:

{if ($$1~/chr/ && 1 !="chrM"  && $1 !~/random/ && $3>$2  && $2>0 && $3>0)

but should be:

{if ($1~/chr/ && 1 !="chrM"  && $1 !~/random/ && $3>$2  && $2>0 && $3>0)
ADD REPLY
0
Entering edit mode

Gah! I saw at that $$ and I just thought it was some sort of notation I wasn't familiar with. Good catch! and thank you so much! I pasted that in, ran the script on my test files and now I have output files. beautiful. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 2701 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6