From f3b0a14e376fa9ad813f03bafa26674395b7fab1 Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 09:56:02 +0100 Subject: [PATCH 1/6] fix folder name --- {referenceC => reference_C}/MANUAL_v1.4.pdf | Bin {referenceC => reference_C}/MANUAL_v1.4.tex | 0 {referenceC => reference_C}/NGS2.sh | 0 {referenceC => reference_C}/PEAKY.R | 0 {referenceC => reference_C}/bedGraphToBigWig | Bin {referenceC => reference_C}/combineReads.c | 0 {referenceC => reference_C}/combineReads.h | 0 {referenceC => reference_C}/complementReverse.c | 0 {referenceC => reference_C}/complementReverse.h | 0 {referenceC => reference_C}/extend.c | 0 {referenceC => reference_C}/graphics.sh | 0 {referenceC => reference_C}/make_hg19.sh | 0 {referenceC => reference_C}/new.c | 0 {referenceC => reference_C}/new2.c | 0 {referenceC => reference_C}/new3.c | 0 {referenceC => reference_C}/parallel | 0 {referenceC => reference_C}/plot.c | 0 {referenceC => reference_C}/plot_mapping_portion.R | 0 {referenceC => reference_C}/plot_mapping_portion2.R | 0 {referenceC => reference_C}/plot_pairing_portion.R | 0 {referenceC => reference_C}/plot_pairing_portion2.R | 0 {referenceC => reference_C}/shiftrev.c | 0 {referenceC => reference_C}/t.c | 0 {referenceC => reference_C}/test | 0 {referenceC => reference_C}/trim_galore | 0 {referenceC => reference_C}/util_sort | 0 {referenceC => reference_C}/utilities.h | 0 {referenceC => reference_C}/utilities2.c | 0 {referenceC => reference_C}/zlib.h | 0 29 files changed, 0 insertions(+), 0 deletions(-) rename {referenceC => reference_C}/MANUAL_v1.4.pdf (100%) rename {referenceC => reference_C}/MANUAL_v1.4.tex (100%) rename {referenceC => reference_C}/NGS2.sh (100%) rename {referenceC => reference_C}/PEAKY.R (100%) rename {referenceC => reference_C}/bedGraphToBigWig (100%) rename {referenceC => reference_C}/combineReads.c (100%) rename {referenceC => reference_C}/combineReads.h (100%) rename {referenceC => reference_C}/complementReverse.c (100%) rename {referenceC => reference_C}/complementReverse.h (100%) rename {referenceC => reference_C}/extend.c (100%) rename {referenceC => reference_C}/graphics.sh (100%) rename {referenceC => reference_C}/make_hg19.sh (100%) rename {referenceC => reference_C}/new.c (100%) rename {referenceC => reference_C}/new2.c (100%) rename {referenceC => reference_C}/new3.c (100%) rename {referenceC => reference_C}/parallel (100%) rename {referenceC => reference_C}/plot.c (100%) rename {referenceC => reference_C}/plot_mapping_portion.R (100%) rename {referenceC => reference_C}/plot_mapping_portion2.R (100%) rename {referenceC => reference_C}/plot_pairing_portion.R (100%) rename {referenceC => reference_C}/plot_pairing_portion2.R (100%) rename {referenceC => reference_C}/shiftrev.c (100%) rename {referenceC => reference_C}/t.c (100%) rename {referenceC => reference_C}/test (100%) rename {referenceC => reference_C}/trim_galore (100%) rename {referenceC => reference_C}/util_sort (100%) rename {referenceC => reference_C}/utilities.h (100%) rename {referenceC => reference_C}/utilities2.c (100%) rename {referenceC => reference_C}/zlib.h (100%) diff --git a/referenceC/MANUAL_v1.4.pdf b/reference_C/MANUAL_v1.4.pdf similarity index 100% rename from referenceC/MANUAL_v1.4.pdf rename to reference_C/MANUAL_v1.4.pdf diff --git a/referenceC/MANUAL_v1.4.tex b/reference_C/MANUAL_v1.4.tex similarity index 100% rename from referenceC/MANUAL_v1.4.tex rename to reference_C/MANUAL_v1.4.tex diff --git a/referenceC/NGS2.sh b/reference_C/NGS2.sh similarity index 100% rename from referenceC/NGS2.sh rename to reference_C/NGS2.sh diff --git a/referenceC/PEAKY.R b/reference_C/PEAKY.R similarity index 100% rename from referenceC/PEAKY.R rename to reference_C/PEAKY.R diff --git a/referenceC/bedGraphToBigWig b/reference_C/bedGraphToBigWig similarity index 100% rename from referenceC/bedGraphToBigWig rename to reference_C/bedGraphToBigWig diff --git a/referenceC/combineReads.c b/reference_C/combineReads.c similarity index 100% rename from referenceC/combineReads.c rename to reference_C/combineReads.c diff --git a/referenceC/combineReads.h b/reference_C/combineReads.h similarity index 100% rename from referenceC/combineReads.h rename to reference_C/combineReads.h diff --git a/referenceC/complementReverse.c b/reference_C/complementReverse.c similarity index 100% rename from referenceC/complementReverse.c rename to reference_C/complementReverse.c diff --git a/referenceC/complementReverse.h b/reference_C/complementReverse.h similarity index 100% rename from referenceC/complementReverse.h rename to reference_C/complementReverse.h diff --git a/referenceC/extend.c b/reference_C/extend.c similarity index 100% rename from referenceC/extend.c rename to reference_C/extend.c diff --git a/referenceC/graphics.sh b/reference_C/graphics.sh similarity index 100% rename from referenceC/graphics.sh rename to reference_C/graphics.sh diff --git a/referenceC/make_hg19.sh b/reference_C/make_hg19.sh similarity index 100% rename from referenceC/make_hg19.sh rename to reference_C/make_hg19.sh diff --git a/referenceC/new.c b/reference_C/new.c similarity index 100% rename from referenceC/new.c rename to reference_C/new.c diff --git a/referenceC/new2.c b/reference_C/new2.c similarity index 100% rename from referenceC/new2.c rename to reference_C/new2.c diff --git a/referenceC/new3.c b/reference_C/new3.c similarity index 100% rename from referenceC/new3.c rename to reference_C/new3.c diff --git a/referenceC/parallel b/reference_C/parallel similarity index 100% rename from referenceC/parallel rename to reference_C/parallel diff --git a/referenceC/plot.c b/reference_C/plot.c similarity index 100% rename from referenceC/plot.c rename to reference_C/plot.c diff --git a/referenceC/plot_mapping_portion.R b/reference_C/plot_mapping_portion.R similarity index 100% rename from referenceC/plot_mapping_portion.R rename to reference_C/plot_mapping_portion.R diff --git a/referenceC/plot_mapping_portion2.R b/reference_C/plot_mapping_portion2.R similarity index 100% rename from referenceC/plot_mapping_portion2.R rename to reference_C/plot_mapping_portion2.R diff --git a/referenceC/plot_pairing_portion.R b/reference_C/plot_pairing_portion.R similarity index 100% rename from referenceC/plot_pairing_portion.R rename to reference_C/plot_pairing_portion.R diff --git a/referenceC/plot_pairing_portion2.R b/reference_C/plot_pairing_portion2.R similarity index 100% rename from referenceC/plot_pairing_portion2.R rename to reference_C/plot_pairing_portion2.R diff --git a/referenceC/shiftrev.c b/reference_C/shiftrev.c similarity index 100% rename from referenceC/shiftrev.c rename to reference_C/shiftrev.c diff --git a/referenceC/t.c b/reference_C/t.c similarity index 100% rename from referenceC/t.c rename to reference_C/t.c diff --git a/referenceC/test b/reference_C/test similarity index 100% rename from referenceC/test rename to reference_C/test diff --git a/referenceC/trim_galore b/reference_C/trim_galore similarity index 100% rename from referenceC/trim_galore rename to reference_C/trim_galore diff --git a/referenceC/util_sort b/reference_C/util_sort similarity index 100% rename from referenceC/util_sort rename to reference_C/util_sort diff --git a/referenceC/utilities.h b/reference_C/utilities.h similarity index 100% rename from referenceC/utilities.h rename to reference_C/utilities.h diff --git a/referenceC/utilities2.c b/reference_C/utilities2.c similarity index 100% rename from referenceC/utilities2.c rename to reference_C/utilities2.c diff --git a/referenceC/zlib.h b/reference_C/zlib.h similarity index 100% rename from referenceC/zlib.h rename to reference_C/zlib.h From 84676a24be01bccd6e7c0e5d378675588ad0befd Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 10:35:00 +0100 Subject: [PATCH 2/6] Update shiftrev.c Fix compile warning --- reference_C/shiftrev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/reference_C/shiftrev.c b/reference_C/shiftrev.c index b1183af..b3882e2 100644 --- a/reference_C/shiftrev.c +++ b/reference_C/shiftrev.c @@ -1,6 +1,7 @@ #include #include #include +#include #define LINE_MAX 0x4000 @@ -76,9 +77,9 @@ if(strncmp(vflag[i],"16",2)==0){ while(*c!=0) { char* p2; - if(!isdigit(*c)) { fprintf(stderr,"bad cigar string: %s\n",*cigar); return 0; } + if(!isdigit(*c)) { fprintf(stderr,"bad cigar string: %s\n",cigar); return 0; } int n=strtol(c,&p2,10); - if(n<1){ fprintf(stderr,"bad cigar string: %s\n",*cigar); return 0; } + if(n<1){ fprintf(stderr,"bad cigar string: %s\n",cigar); return 0; } switch(*p2) { case 'M':{ while(n>0) { icount++; --n; } break; } @@ -97,9 +98,9 @@ if(strncmp(vflag[j],"16",2)==0){ while(*c!=0) { char* p2; - if(!isdigit(*c)) { fprintf(stderr,"bad cigar string: %s\n",*cigar); return 0; } + if(!isdigit(*c)) { fprintf(stderr,"bad cigar string: %s\n",cigar); return 0; } int n=strtol(c,&p2,10); - if(n<1){ fprintf(stderr,"bad cigar string: %s\n",*cigar); return 0; } + if(n<1){ fprintf(stderr,"bad cigar string: %s\n",cigar); return 0; } switch(*p2) { case 'M':{ while(n>0) { jcount++; --n; } break; } From b84142087a1245e826b271d1ba7a66831bd5f1e1 Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 10:36:06 +0100 Subject: [PATCH 3/6] Update new.c --- reference_C/new.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/reference_C/new.c b/reference_C/new.c index 092faa7..c43de19 100644 --- a/reference_C/new.c +++ b/reference_C/new.c @@ -20,7 +20,7 @@ #define PACKAGE "ICECap" #define VERSION "0.01" -#define CHROMOSOMES 22 +#define CHROMOSOMES 25 #define WIN_SHIFT1 1 #define RESOLUTION 1000 @@ -245,7 +245,7 @@ number_for_key(char *key) } sprintf(zom,"%d",SCALE); sprintf(wind,"%d",window); -sprintf(stamp,concat(concat(concat("/NewAnalysis_Z",zom),"_W"),wind)); +sprintf(stamp,concat(concat(concat("/Analysis_Z",zom),"_W"),wind)); init(lane,folder,folderN,PATHBOWTIE,chrom_start,chrom_end,stamp,stamp2,stats); @@ -335,7 +335,7 @@ printf("\n %d Chromosomes will be considered \n",chrom_end); if(strlen(folderN)==0){folderN=folder; }else{ sprintf(zom,"%d",SCALE); - sprintf(stamp,concat(concat(concat("/NewAnalysis_Z",zom),"_W"),wind)); + sprintf(stamp,concat(concat(concat("/Analysis_Z",zom),"_W"),wind)); mkdir(concat(concat(folder,lane),stamp),0777); mkdir(concat(concat(concat(concat(folder,lane),stamp),"/weights"),stamp2),0777); mkdir(concat(concat(concat(concat(concat(folder,lane),stamp),"/"),stats),stamp2),0777); mkdir(concat(concat(concat(concat(concat(concat(folder,lane),stamp),"/"),stats),stamp2),"/fdr"),0777); @@ -691,8 +691,10 @@ fclose(fout6); FILE *tads= fopen(concat(concat(concat(concat(outdir,lane),"_Z"),zom),".tad"), "w+"); FILE *peakY = fopen(concat(concat(concat(concat(outdir,lane),"_Z"),zom),".pkY"), "w+"); FILE *peakY2 = fopen(concat(concat(concat(concat(outdir,lane),"_Z"),zom),".cool"), "w+"); + FILE *gff; - FILE *peakC; +FILE *peakC; + FILE *wig= fopen(concat(concat(concat(concat(outdir,lane),"_Z"),zom),".wig"), "w+"); pchic=0; @@ -708,7 +710,8 @@ sprintf(sbait,"%d",i); if(strcasecmp(stringarray[i],"")!=0){sprintf(sbait,"%s",stringarray[i]);} FILE *peakC = fopen(concat(concat(concat(concat(concat(concat(outdir2,lane),"_BAIT_"),sbait),"_Z"),zom),".pkC"), "w+"); -FILE *gff = fopen(concat(concat(concat(concat(concat(concat(outdir2,lane),"_BAIT_"),sbait),"_Z"),zom),".gff"), "w+"); +FILE *gff = fopen(concat(concat(concat(concat(concat(outdir2,lane),"_BAIT_"),sbait),"_Z1"),".gff"), "w+"); + if(pchic==1){ }else{ @@ -750,7 +753,7 @@ fprintf(tads,"%d\t",hic[i][j]); fdist=100000000;} if(hic[i][j]>0){ if(j>=i){fprintf(peakY2,"%d\t%d\t%d\n",i,j,hic[i][j]);} -printf("BOH: %d\t%d\t%d\t%d\n",i,j,chrombait[i],chrombait[j]); +/* printf("BOH: %d\t%d\t%d\t%d\n",i,j,chrombait[i],chrombait[j]); */ if(chrombait[i]!=chromgrid[j]){ fprintf(peakY,"%d\t%d\t%d\t%f\t%f\t%f\n",totfragments[chrombait[i]-1]+cgrid(chrombait[i],baitpoints[chrombait[i]][i-totbaits[chrombait[i]-1]]+(1-pchic)*RESOLUTION,gp,gridpoints),j,hic[i][j],fdist,1,1); }else{ @@ -763,6 +766,9 @@ fprintf(peakY,"%d\t%d\t%d\t%f\t%f\t%f\n",totfragments[chrombait[i]-1]+cgrid(chro } } } +if(pchic==1){ +if(hic[i][j]!=0){fprintf(gff,"%s\tICE\t%s\t%d\t%d\t%d\t+\t0\t.\n",record[chromgrid[j]].name_chromosome,sbait,gridpoints[chromgrid[j]][j-(totfragments[chromgrid[j]-1]+1)],gridpoints[chromgrid[j]][j-(totfragments[chromgrid[j]-1])],hic[i][j]);} +} } fclose(peakC); @@ -818,7 +824,7 @@ sprintf(command,"sed -i 's/chr//' %s",concat(concat(outdir,lane),".tsv")); system(command); printf("%s\n",command); -sprintf(command,"R --vanilla < %sPEAKY.R --args %s %s %s %s %d ",folderrefC,outdir,concat(concat(concat(concat(outdir,lane),"_Z"),zom),".pkY"),concat(outdir,"/bins/"),concat(concat(outdir,lane),".tsv"),window); +sprintf(command,"R --no-save < %sPEAKY.R --args %s %s %s %s %d ",folderrefC,outdir,concat(concat(concat(concat(outdir,lane),"_Z"),zom),".pkY"),concat(outdir,"/bins/"),concat(concat(outdir,lane),".tsv"),window); printf("%s\n",command); system(command); From 4737688eb17686f94a0dac458730d18276b789a0 Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 10:38:57 +0100 Subject: [PATCH 4/6] Update trim_galore --- reference_C/trim_galore | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reference_C/trim_galore b/reference_C/trim_galore index 1dfbb28..9fb964c 100644 --- a/reference_C/trim_galore +++ b/reference_C/trim_galore @@ -44,7 +44,7 @@ file_sanity_check($filenames[0]); ######################################################################## -my $path_to_fastqc = '/usr/bin/fastqc'; +my $path_to_fastqc = '/well/jknight/software/rescomp/bin/fastqc'; # Before we start let's have quick look if Cutadapt seems to be working with the path information provided # To change the path to Cutadapt use --path_to_cutadapt /full/path/to/the/Cutadapt/executable @@ -54,7 +54,7 @@ if(defined $path_to_cutadapt){ # we'll simply use this } else{ - $path_to_cutadapt = '/usr/people/whgu0738/.local/bin/cutadapt'; # default, assuming it is in the PATH + $path_to_cutadapt = '/apps/well/python/2.7.11/bin/cutadapt'; # default, assuming it is in the PATH warn "Path to Cutadapt set as: '$path_to_cutadapt' (default)\n"; } my $cutadapt_version; @@ -338,7 +338,7 @@ sub trim{ warn " >>> Now performing adaptive quality trimming with a Phred-score cutoff of: $cutoff <<<\n\n"; sleep (1); - open (QUAL,"$path_to_cutadapt -e $error_rate -q $cutoff -a X $filename |") or die "Can't open pipe to Cutadapt: $!"; + open (QUAL,"$path_to_cutadapt -f fastq -e $error_rate -q $cutoff -a X $filename |") or die "Can't open pipe to Cutadapt: $!"; my $qual_count = 0; @@ -417,19 +417,19 @@ sub trim{ if ( scalar(@filenames)%2 == 0){ # this is read 1 of a pair warn "\n >>> Now performing adapter trimming for the adapter sequence: '$adapter' from file $temp <<< \n"; sleep (1); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -e $error_rate -O $stringency -a $adapter $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -f fastq -e $error_rate -O $stringency -a $adapter $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; } else{ # this is read 2 of a pair warn "\n >>> Now performing adapter trimming for the adapter sequence: '$a2' from file $temp <<< \n"; sleep (1); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -e $error_rate -O $stringency -a $a2 $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -f fastq -e $error_rate -O $stringency -a $a2 $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; } } ### Using the same adapter for both read 1 and read 2 else{ warn "\n >>> Now performing adapter trimming for the adapter sequence: '$adapter' from file $temp <<< \n"; sleep (3); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -e $error_rate -O $stringency -a $adapter $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR,"$path_to_cutadapt -f fastq -e $error_rate -O $stringency -a $adapter $output_dir$temp") or die "Failed to launch Cutadapt: $!\n"; } close WRITER or die $!; # not needed @@ -587,19 +587,19 @@ sub trim{ if ( scalar(@filenames)%2 == 0){ # this is read 1 of a pair warn "\n >>> Now performing quality (cutoff $cutoff) and adapter trimming in a single pass for the adapter sequence: '$adapter' from file $filename <<< \n"; sleep (1); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -e $error_rate -q $cutoff -O $stringency $trim_n -a $adapter $filename") or die "Failed to launch Cutadapt: $!"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -f fastq -e $error_rate -q $cutoff -O $stringency $trim_n -a $adapter $filename") or die "Failed to launch Cutadapt: $!"; } else{ # this is read 2 of a pair warn "\n >>> Now performing quality (cutoff $cutoff) and adapter trimming in a single pass for the adapter sequence: '$a2' from file $filename <<< \n"; sleep (1); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -e $error_rate -q $cutoff -O $stringency $trim_n -a $a2 $filename") or die "Failed to launch Cutadapt: $!"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -f fastq -e $error_rate -q $cutoff -O $stringency $trim_n -a $a2 $filename") or die "Failed to launch Cutadapt: $!"; } } ### Using the same adapter for both read 1 and read 2 else{ warn "\n >>> Now performing quality (cutoff $cutoff) and adapter trimming in a single pass for the adapter sequence: '$adapter' from file $filename <<< \n"; sleep (1); - $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -e $error_rate -q $cutoff -O $stringency $trim_n -a $adapter $filename") or die "Failed to launch Cutadapt: $!"; + $pid = open3 (\*WRITER, \*TRIM, \*ERROR, "$path_to_cutadapt -f fastq -e $error_rate -q $cutoff -O $stringency $trim_n -a $adapter $filename") or die "Failed to launch Cutadapt: $!"; } close WRITER or die $!; # not needed From 298fe1592c798e320954e02e23496e5014625154 Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 11:05:06 +0100 Subject: [PATCH 5/6] Update README.md --- README.md | 274 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 162 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index a2e6929..58228fa 100644 --- a/README.md +++ b/README.md @@ -1,123 +1,168 @@ -ICeCAP is written in ANSI-C and provides flexible, multi-scale analysis of $BOTH$ Hi-C and Capture-C/Capture-Hi-C data. Dynamical, pointer based memory allocation and mapping of sub-genomic regions allow interaction maps to be resolved computationally at single restriction fragment, "meta-fragment" or uniform resolution. -The output files can be converted to $hic$ and $cool$ format with the $Juicer$ and $Hi-Glass$ tools. - +ICeCAP is written in ANSI-C and provides flexible, multi-scale analysis +of $BOTH$ Hi-C and Capture-C/Capture-Hi-C data. Dynamical, pointer based +memory allocation and mapping of sub-genomic regions allow interaction +maps to be resolved computationally at single restriction fragment, +"meta-fragment" or uniform resolution. The output files can be converted +to $hic$ and $cool$ format with the $Juicer$ and $Hi-Glass$ tools. GNU GPL v3 license applies.\\ \section*{Requirements:} -*******************\\ -ICeCap runs in a Linux environment running bash shell with GNU environment default functions (gawk, sort, sed, etc...) available at run time. -Compilation is done using the GNU Compiler (GCC). This may be changed by editing the make file (see below). -Read alignment is carried out using bowtie2, version 2.2.X. This should be available in the PATH environtment variable. To check the available version of bowtie type "bowtie2 --version" at the command line. -Bowtie reference files should be generated using the same reference genome as the one used during alignment (see the bowtie manual for details). -Bed formatted mapability files for the species under study should be placed in the subfolder "reference\_map". See the README file in that folder. -The mapability files should be generated by the same version of the aligner below. A script to help building mapability files is included. -Perl version v5.10.1 or later is expected, earlier versions may also work. -R version 3.X.X or later is expected. -Free disk space that is at least double the size of the input fastq files is recommended, more if intermediate files are kept (see options). -A considerable amount of RAM may also be needed depending on the number of fragments or bins being analysed. Analysis of data from a typical experiment involving the human genome digested with HindIII may require around 40 gigabytes of RAM. A minimum 1kb resolution is the default setting, though higher resolution is in principle possible, when considering .e.g. four base cutter enzyme or other digestion protocols. +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ ICeCap runs in a Linux +environment running bash shell with GNU environment default functions +(gawk, sort, sed, etc...) available at run time. Compilation is done +using the GNU Compiler (GCC). This may be changed by editing the make +file (see below). Read alignment is carried out using bowtie2, version +2.2.X. This should be available in the PATH environtment variable. To +check the available version of bowtie type "bowtie2 --version" at the +command line. Bowtie reference files should be generated using the same +reference genome as the one used during alignment (see the bowtie manual +for details). Bed formatted mapability files for the species under study +should be placed in the subfolder "reference\_map". See the README file +in that folder. The mapability files should be generated by the same +version of the aligner below. A script to help building mapability files +is included. Perl version v5.10.1 or later is expected, earlier versions +may also work. R version 3.X.X or later is expected. Free disk space +that is at least double the size of the input fastq files is +recommended, more if intermediate files are kept (see options). A +considerable amount of RAM may also be needed depending on the number of +fragments or bins being analysed. Analysis of data from a typical +experiment involving the human genome digested with HindIII may require +around 40 gigabytes of RAM. A minimum 1kb resolution is the default +setting, though higher resolution is in principle possible, when +considering .e.g. four base cutter enzyme or other digestion protocols. Please make sure all dependencies are met. E.g: -export PATH bowtie2/2.2.5/"; -export PATH parallel/20161122/bin/"; -export PATH R/3.4.3/lib64/R/bin/"; +export PATH bowtie2/2.2.5/"; export PATH parallel/20161122/bin/"; export +PATH R/3.4.3/lib64/R/bin/"; \section{Compilation:} -*******************\\ -Unzip/untar the file ICeCap.tar.gz: +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ Unzip/untar the file +ICeCap.tar.gz: -$>$ tar -zxvf ICeCap.tar.gz\\ -Run the make file found in the ICeCap directory to compile the ICeCap binary file. The ICeCap directory can either be in your home folder or -can be installed with administration privileges in the root directory. -Make sure you add the ICeCap folder to your PATH environment in this case. -In the ICeCap folder, at the command line prompt, type:\\ +$>$ tar -zxvf ICeCap.tar.gz\\ Run the make file found in the ICeCap +directory to compile the ICeCap binary file. The ICeCap directory can +either be in your home folder or can be installed with administration +privileges in the root directory. Make sure you add the ICeCap folder to +your PATH environment in this case. In the ICeCap folder, at the command +line prompt, type:\\ -$>$ make\\ -That is all. Test shell scripts for submitting ICeCAP on a suitable queuing environment are provided. +$>$ make\\ That is all. Test shell scripts for submitting ICeCAP on a +suitable queuing environment are provided. \vspace*{1cm} - \section{Running ICeCap:} -*******************\\ -ICeCap takes unaligned sequencing data in the FASTQ format. The data is processed in two stages: \\ - -*Firstly, sequencing reads are processed to take into account ligation junctions. Flashing occurs followed by insilico digestion. Reporter/baited fragments are aligned using bowtie2. Valid ditags, along the lines of other NGS pipelines, e.g. HICCUP, are identified and stored in SAM-like format files. Allele specific calibration of reads is available in the option list (see below).\\ - -*Secondly, a matrix of interacting intervals is populated. The resolution can be choosen to be fragment based or uniform-bin based. Iterative correction and interaction distance normalisation is carried out along the lines of the Sinkhorn-Knopp algorithm via e.g. cool tools. A list of significant interactions based on the HICCUPs algorithm, namely a local Poisson backgroup approach, can also be produced using the hic files generated by the juicer tools. - +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ ICeCap takes unaligned +sequencing data in the FASTQ format. The data is processed in two +stages: \\ + +\*Firstly, sequencing reads are processed to take into account ligation +junctions. Flashing occurs followed by insilico digestion. +Reporter/baited fragments are aligned using bowtie2. Valid ditags, along +the lines of other NGS pipelines, e.g. HICCUP, are identified and stored +in SAM-like format files. Allele specific calibration of reads is +available in the option list (see below).\\ + +\*Secondly, a matrix of interacting intervals is populated. The +resolution can be choosen to be fragment based or uniform-bin based. +Iterative correction and interaction distance normalisation is carried +out along the lines of the Sinkhorn-Knopp algorithm via e.g. cool tools. +A list of significant interactions based on the HICCUPs algorithm, +namely a local Poisson backgroup approach, can also be produced using +the hic files generated by the juicer tools. \subsection{**STAGE 1: read alignment, pairing, deduplication, and ditag validation.} - \vspace*{1cm} -To process sequencing data from, e.g., a non-capture Hi-C experiment, using the HindIII restriction enzyme, run in your system, as a $single$ line command, e.g.:\\ - -$\bullet$ /path/to/binary/ICeCap -E AAGCTT -C 1 \\ --L /path/to/your/fastqfiles one strand/ \\ --R /path/to/your/fastqfiles one strand/ \\ --P /path/to/your/bowtie/reference/directory/ \\ --l sampleid \\ --T 100 \\ --f /path/to/your/ICeCap/directory/ \\ --D /path/to/your/outputsam/folder/ \\ - -To process capture Hi-C data a BED formated file listing the captured intervals needs to be provided using the -B option. \\ - -$\bullet$ ICeCap -B path/to/baits.bed -E AAGCTT -C 1 \\ --L /path/to/your/inputfastq/file(s) \\ --R /path/to/your/inputfastq/file(s) \\ --P /path/to/your/bowtie/reference/directory/ \\ --l sampleid \\ --T 100 \\ --f /path/to/your/ICeCap/directory/ \\ --D /path/to/your/outputsam/folder/ \\ - -ICeCap will carry out a virtual digestion of the reference genome provided (default hg19), generating a list of fragments. -Multiple files can be concatenated passing to the -L/-R flags a folder containing all files, e.g. both the left and right strand flag, e.g. $-L /pathR$,$-R /pathL$. The strings $1.fastq$ and $2.fastq$ are expected on each file, file names should sort match, and total number of reads on each strand should be equal. -Make sure you submit the command above with a suitable queuing environment, e.g. MOAB, LSF etc. - -STAGE 1 will produced SAM files listing valid ditags to be used for subsequent analysis. A header can be found in the "data" directory. -The following output files will be produced in the output directory, e.g. /sampleid/data (indicated with the -D option). - -File name | File contents\\ +To process sequencing data from, e.g., a non-capture Hi-C experiment, +using the HindIII restriction enzyme, run in your system, as a $single$ +line command, e.g.:\\ + +$\bullet$ /path/to/binary/ICeCap -E AAGCTT -C 1 \\ -L +/path/to/your/fastqfiles one strand/ \\ -R /path/to/your/fastqfiles one +strand/ \\ -P /path/to/your/bowtie/reference/directory/ \\ -l sampleid +\\ -T 100 \\ -f /path/to/your/ICeCap/directory/ \\ -D +/path/to/your/outputsam/folder/ \\ + +To process capture Hi-C data a BED formated file listing the captured +intervals needs to be provided using the -B option. \\ + +$\bullet$ ICeCap -B path/to/baits.bed -E AAGCTT -C 1 \\ -L +/path/to/your/inputfastq/file(s) \\ -R /path/to/your/inputfastq/file(s) +\\ -P /path/to/your/bowtie/reference/directory/ \\ -l sampleid \\ -T 100 +\\ -f /path/to/your/ICeCap/directory/ \\ -D +/path/to/your/outputsam/folder/ \\ + +ICeCap will carry out a virtual digestion of the reference genome +provided (default hg19), generating a list of fragments. Multiple files +can be concatenated passing to the -L/-R flags a folder containing all +files, e.g. both the left and right strand flag, e.g. +$-L /pathR$,$-R /pathL$. The strings $1.fastq$ and $2.fastq$ are +expected on each file, file names should sort match, and total number of +reads on each strand should be equal. Make sure you submit the command +above with a suitable queuing environment, e.g. MOAB, LSF etc. + +STAGE 1 will produced SAM files listing valid ditags to be used for +subsequent analysis. A header can be found in the "data" directory. The +following output files will be produced in the output directory, e.g. +/sampleid/data (indicated with the -D option). + +File name | File contents\\ ----------------------------------------------------------------------------------\\ -sampleid/data/SIZES | Ditag sizes.\\ -sampleid/data/GSIZE | Valid ditag sizes.\\ -sampleid/data/BSIZE | Invalid ditag sizes.\\ -sampleid/data/sampleid.png | Plot of bona-fide and filtered di-tags size distributions \\ -sampleid/data/Invalid\_ditag\_chart.pdf | Pie chart with the relative ratio of invalid di-tags filtered out. -sampleid/data/sampleid.COUNTS.txt | Statistics about the numbers of aligned reads and valid ditags.\\ -sampleid/data/sampleid.pairs.chr*.sam.bfide | SAM-like file listing valid ditags.\\ -sampleid/data/sampleid.pairs.chr*.sam.bfide.ontarget | SAM-like file listing valid ditags corresponding to enriched ditags in \\ - the case of capture Hi-C or all ditags in the case of non-capture Hi-C.\\ +sampleid/data/SIZES | Ditag sizes.\\ sampleid/data/GSIZE | Valid ditag +sizes.\\ sampleid/data/BSIZE | Invalid ditag sizes.\\ +sampleid/data/sampleid.png | Plot of bona-fide and filtered di-tags size +distributions \\ sampleid/data/Invalid\_ditag\_chart.pdf | Pie chart +with the relative ratio of invalid di-tags filtered out. +sampleid/data/sampleid.COUNTS.txt | Statistics about the numbers of +aligned reads and valid ditags.\\ +sampleid/data/sampleid.pairs.chr*.sam.bfide | SAM-like file listing +valid ditags.\\ sampleid/data/sampleid.pairs.chr*.sam.bfide.ontarget | +SAM-like file listing valid ditags corresponding to enriched ditags in +\\ the case of capture Hi-C or all ditags in the case of non-capture +Hi-C.\\ \subsection{**STAGE 2: Matrix allocation and interaction calling.} - -To run this stage, use the -N option to allocate di-tags to memory and postprocessing analysis. -The -S option will run statistical analysis on the two pools of data obtained: enriched to non-enriched (E-N) as well as the enriched to enriched (E-E) interactions. -The argument to the -S option indicats the type of distribution that will be used as a local background model in the three-filtered, HiCCUPs like, method. - -Example of interaction analysis in capture Hi-C data carried out on chromosomes 1, 2 and 3. -\\ -ICeCap -N -l sampleid \\ --s 1 -e 3 -G 0 -Z 1 -Q path/to/mappability/files -B path/to/baits.bed -P path/to/bowtiereference/files \\ - -Mandatory fields are the -N flag, the reference fasta file directory (-P), the sample id (-l), that should correspond to those used in the STAGE 1 above, and the (-f) path to the ICeCap folder. -If no baits BED file is specified (with the -B option), the pipeline will run in non-capture mode and allocate all fragment pairs to memory. -Note that the mappability files should be in the ICeCap folder, in a folder called $reference\_map$ or should be specified by thwe $-Q$ flag. -Setting -G 0 indicates that a restriction based (non-uniform) binning will be used. -Alternatively, if the -G option is set to 1, a uniform binning is chosen, with a size of r*Z bp. (see the -r and -Z flags below). -The -Z parameter will corse grain the analysis. So, for example, -G 0 -Z 1 corresponds to single fragment binning. -Similarly, -G 0 -Z 4 will correspond to a "meta-fragment" based binning, where four consecutive fragments are combined. -The -Z option can also be used with uniform bins, e.g. -G 1 -Z 5 will correspond to a uniform binning grid of mesh size 5*r=5kb. (default value -of the -r option is $1000~bp$). -Interactions passing the FDR threshold, together with the associated q-values can be found in the "sampleid/stats/fdr" directory for further analysis and for plotting purposes. A Wash-U formatted file with all significant interactions will also be generated in the output folder, as specified by the -O option. Per fragment iWash files are grouped in chromosome start/end subfolder(s) for individual locus analysis. +To run this stage, use the -N option to allocate di-tags to memory and +postprocessing analysis. The -S option will run statistical analysis on +the two pools of data obtained: enriched to non-enriched (E-N) as well +as the enriched to enriched (E-E) interactions. The argument to the -S +option indicats the type of distribution that will be used as a local +background model in the three-filtered, HiCCUPs like, method. + +Example of interaction analysis in capture Hi-C data carried out on +chromosomes 1, 2 and 3. \\ ICeCap -N -l sampleid \\ -s 1 -e 3 -G 0 -Z 1 +-Q path/to/mappability/files -B path/to/baits.bed -P +path/to/bowtiereference/files \\ + +Mandatory fields are the -N flag, the reference fasta file directory +(-P), the sample id (-l), that should correspond to those used in the +STAGE 1 above, and the (-f) path to the ICeCap folder. If no baits BED +file is specified (with the -B option), the pipeline will run in +non-capture mode and allocate all fragment pairs to memory. Note that +the mappability files should be in the ICeCap folder, in a folder called +$reference\_map$ or should be specified by thwe $-Q$ flag. Setting -G 0 +indicates that a restriction based (non-uniform) binning will be used. +Alternatively, if the -G option is set to 1, a uniform binning is +chosen, with a size of r*Z bp. (see the -r and -Z flags below). The -Z +parameter will corse grain the analysis. So, for example, -G 0 -Z 1 +corresponds to single fragment binning. Similarly, -G 0 -Z 4 will +correspond to a "meta-fragment" based binning, where four consecutive +fragments are combined. The -Z option can also be used with uniform +bins, e.g. -G 1 -Z 5 will correspond to a uniform binning grid of mesh +size 5*r=5kb. (default value of the -r option is $1000~bp$). +Interactions passing the FDR threshold, together with the associated +q-values can be found in the "sampleid/stats/fdr" directory for further +analysis and for plotting purposes. A Wash-U formatted file with all +significant interactions will also be generated in the output folder, as +specified by the -O option. Per fragment iWash files are grouped in +chromosome start/end subfolder(s) for individual locus analysis. \section{ICeCap Options:} -*******************\\ -The following options can be passed to the ICeCap program. +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ The following options can be +passed to the ICeCap program. -************************************************************************************\\ +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ **GENERAL OPTIONAL ARGUMENTS** -h, --help Print this manual and exit. @@ -127,9 +172,10 @@ The following options can be passed to the ICeCap program. -B, --baits path to file path to a BED file [without header lines] listing fragments that were enriched in the capture Hi-C experimental protocol. If this option is not supplied, analysis is carried out on all fragments as in non-capture Hi-C. \\ -b Specifies if Ligation is blunt. Default for CaptureC, specify e.g. -b hic if biotin filled non blunt end ligations occur in the experimental protocol -************************************************************************************ \\ -**MANDATORY ARGUMENTS FOR STAGE 1** - + +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\\ **MANDATORY ARGUMENTS FOR STAGE 1** + -E, CURRENT VERSION WORKING ON GATC-DpnII only. available version for any restriction site sequencing. --site-sequence nucleotide sequence string Specifies the enzyme recognition site sequence. Currently, only enzymes that cut at palindromic sequences are supported. The default value is AAGCTT, which corresponds to the HindIII recognition seuqence. @@ -137,15 +183,16 @@ The following options can be passed to the ICeCap program. -C, --cut-position integer Number of bases from the start of the recognition site sequence to the cut point. - (e.g for HindIII use -C 1) + +(e.g for HindIII use -C 1) -AAGCTT- -A AGCTT- -TTGCAA- -TTGCA A- \\ - (e.g. for MboI use -C 0) - +(e.g. for MboI use -C 0) + -GATC- - GATC- -CTAG- -CTAG - \\ @@ -167,7 +214,7 @@ The following options can be passed to the ICeCap program. -l Sample Name/ID of the Biological replicate.\\ -*******************************************************************\\ +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ **OPTIONAL ARGUMENTS FOR STAGE 1** -D, --output-sam folder: The output directory where the files listing ditags in SAM format, as well as intermediate processing files (in the subdirectory "BOWTIE"), will be written. This may include a prefix corresponding to the beginning of the file names. The default is the current working directory. @@ -178,7 +225,7 @@ The following options can be passed to the ICeCap program. -J Number of cores used by Bowtie2. -******************************************************************\\ +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ **MANDATORY ARGUMENTS FOR STAGE 2** -N, this flag will point to STAGE 2. It does not require an argument. @@ -190,7 +237,7 @@ The following options can be passed to the ICeCap program. -I Please provide a directory path here. IT should match the -D path, as given on stage 1, and corresponds to the folder where the Sample Name/ID folder and data subfolder containing the bona fide sam files generated in stage 1 are located. -*****************************************************************\\ +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ **OPTIONAL ARGUMENTS FOR STAGE 2** -o Output prefix of choice to mark a specific instance of ICeCAP. @@ -229,13 +276,16 @@ The following options can be passed to the ICeCap program. -X, --dev Leave as default. Currently only pkY analysis occurs. -**************************************************************************\\ +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ \section{Graphical Interface} -Please make sure to have the X11 libraries running on your desktop environment. -At compile time, an executable named 'ICeCap\_plot' is generated. Please use the command line help option. -\section*{Updates} +Please make sure to have the X11 libraries running on your desktop +environment. At compile time, an executable named 'ICeCap\_plot' is +generated. Please use the command line help option. \section*{Updates} -Version 1.0-1.4 also includes graphical interface, used to plot heatmaps, topologically associating domains, significant interactions and Ensembl Genes. It is under current development and is based on the ANSI-C X11 graphical interface. +Version 1.0-1.4 also includes graphical interface, used to plot +heatmaps, topologically associating domains, significant interactions +and Ensembl Genes. It is under current development and is based on the +ANSI-C X11 graphical interface. -\end{document}# ICeCAP +\\end{document}\# ICeCAP From aa6cd79cc278511e63f8a3b434b5f2ba7b6ae6c0 Mon Sep 17 00:00:00 2001 From: abrown44 Date: Mon, 18 Jul 2022 11:06:43 +0100 Subject: [PATCH 6/6] Revert "Update README.md" This reverts commit 298fe1592c798e320954e02e23496e5014625154. --- README.md | 274 ++++++++++++++++++++++-------------------------------- 1 file changed, 112 insertions(+), 162 deletions(-) diff --git a/README.md b/README.md index 58228fa..a2e6929 100644 --- a/README.md +++ b/README.md @@ -1,168 +1,123 @@ -ICeCAP is written in ANSI-C and provides flexible, multi-scale analysis -of $BOTH$ Hi-C and Capture-C/Capture-Hi-C data. Dynamical, pointer based -memory allocation and mapping of sub-genomic regions allow interaction -maps to be resolved computationally at single restriction fragment, -"meta-fragment" or uniform resolution. The output files can be converted -to $hic$ and $cool$ format with the $Juicer$ and $Hi-Glass$ tools. +ICeCAP is written in ANSI-C and provides flexible, multi-scale analysis of $BOTH$ Hi-C and Capture-C/Capture-Hi-C data. Dynamical, pointer based memory allocation and mapping of sub-genomic regions allow interaction maps to be resolved computationally at single restriction fragment, "meta-fragment" or uniform resolution. +The output files can be converted to $hic$ and $cool$ format with the $Juicer$ and $Hi-Glass$ tools. + GNU GPL v3 license applies.\\ \section*{Requirements:} -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ ICeCap runs in a Linux -environment running bash shell with GNU environment default functions -(gawk, sort, sed, etc...) available at run time. Compilation is done -using the GNU Compiler (GCC). This may be changed by editing the make -file (see below). Read alignment is carried out using bowtie2, version -2.2.X. This should be available in the PATH environtment variable. To -check the available version of bowtie type "bowtie2 --version" at the -command line. Bowtie reference files should be generated using the same -reference genome as the one used during alignment (see the bowtie manual -for details). Bed formatted mapability files for the species under study -should be placed in the subfolder "reference\_map". See the README file -in that folder. The mapability files should be generated by the same -version of the aligner below. A script to help building mapability files -is included. Perl version v5.10.1 or later is expected, earlier versions -may also work. R version 3.X.X or later is expected. Free disk space -that is at least double the size of the input fastq files is -recommended, more if intermediate files are kept (see options). A -considerable amount of RAM may also be needed depending on the number of -fragments or bins being analysed. Analysis of data from a typical -experiment involving the human genome digested with HindIII may require -around 40 gigabytes of RAM. A minimum 1kb resolution is the default -setting, though higher resolution is in principle possible, when -considering .e.g. four base cutter enzyme or other digestion protocols. +*******************\\ +ICeCap runs in a Linux environment running bash shell with GNU environment default functions (gawk, sort, sed, etc...) available at run time. +Compilation is done using the GNU Compiler (GCC). This may be changed by editing the make file (see below). +Read alignment is carried out using bowtie2, version 2.2.X. This should be available in the PATH environtment variable. To check the available version of bowtie type "bowtie2 --version" at the command line. +Bowtie reference files should be generated using the same reference genome as the one used during alignment (see the bowtie manual for details). +Bed formatted mapability files for the species under study should be placed in the subfolder "reference\_map". See the README file in that folder. +The mapability files should be generated by the same version of the aligner below. A script to help building mapability files is included. +Perl version v5.10.1 or later is expected, earlier versions may also work. +R version 3.X.X or later is expected. +Free disk space that is at least double the size of the input fastq files is recommended, more if intermediate files are kept (see options). +A considerable amount of RAM may also be needed depending on the number of fragments or bins being analysed. Analysis of data from a typical experiment involving the human genome digested with HindIII may require around 40 gigabytes of RAM. A minimum 1kb resolution is the default setting, though higher resolution is in principle possible, when considering .e.g. four base cutter enzyme or other digestion protocols. Please make sure all dependencies are met. E.g: -export PATH bowtie2/2.2.5/"; export PATH parallel/20161122/bin/"; export -PATH R/3.4.3/lib64/R/bin/"; +export PATH bowtie2/2.2.5/"; +export PATH parallel/20161122/bin/"; +export PATH R/3.4.3/lib64/R/bin/"; \section{Compilation:} -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ Unzip/untar the file -ICeCap.tar.gz: +*******************\\ +Unzip/untar the file ICeCap.tar.gz: -$>$ tar -zxvf ICeCap.tar.gz\\ Run the make file found in the ICeCap -directory to compile the ICeCap binary file. The ICeCap directory can -either be in your home folder or can be installed with administration -privileges in the root directory. Make sure you add the ICeCap folder to -your PATH environment in this case. In the ICeCap folder, at the command -line prompt, type:\\ +$>$ tar -zxvf ICeCap.tar.gz\\ +Run the make file found in the ICeCap directory to compile the ICeCap binary file. The ICeCap directory can either be in your home folder or +can be installed with administration privileges in the root directory. +Make sure you add the ICeCap folder to your PATH environment in this case. +In the ICeCap folder, at the command line prompt, type:\\ -$>$ make\\ That is all. Test shell scripts for submitting ICeCAP on a -suitable queuing environment are provided. +$>$ make\\ +That is all. Test shell scripts for submitting ICeCAP on a suitable queuing environment are provided. \vspace*{1cm} + \section{Running ICeCap:} -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ ICeCap takes unaligned -sequencing data in the FASTQ format. The data is processed in two -stages: \\ - -\*Firstly, sequencing reads are processed to take into account ligation -junctions. Flashing occurs followed by insilico digestion. -Reporter/baited fragments are aligned using bowtie2. Valid ditags, along -the lines of other NGS pipelines, e.g. HICCUP, are identified and stored -in SAM-like format files. Allele specific calibration of reads is -available in the option list (see below).\\ - -\*Secondly, a matrix of interacting intervals is populated. The -resolution can be choosen to be fragment based or uniform-bin based. -Iterative correction and interaction distance normalisation is carried -out along the lines of the Sinkhorn-Knopp algorithm via e.g. cool tools. -A list of significant interactions based on the HICCUPs algorithm, -namely a local Poisson backgroup approach, can also be produced using -the hic files generated by the juicer tools. +*******************\\ +ICeCap takes unaligned sequencing data in the FASTQ format. The data is processed in two stages: \\ + +*Firstly, sequencing reads are processed to take into account ligation junctions. Flashing occurs followed by insilico digestion. Reporter/baited fragments are aligned using bowtie2. Valid ditags, along the lines of other NGS pipelines, e.g. HICCUP, are identified and stored in SAM-like format files. Allele specific calibration of reads is available in the option list (see below).\\ + +*Secondly, a matrix of interacting intervals is populated. The resolution can be choosen to be fragment based or uniform-bin based. Iterative correction and interaction distance normalisation is carried out along the lines of the Sinkhorn-Knopp algorithm via e.g. cool tools. A list of significant interactions based on the HICCUPs algorithm, namely a local Poisson backgroup approach, can also be produced using the hic files generated by the juicer tools. + \subsection{**STAGE 1: read alignment, pairing, deduplication, and ditag validation.} + \vspace*{1cm} -To process sequencing data from, e.g., a non-capture Hi-C experiment, -using the HindIII restriction enzyme, run in your system, as a $single$ -line command, e.g.:\\ - -$\bullet$ /path/to/binary/ICeCap -E AAGCTT -C 1 \\ -L -/path/to/your/fastqfiles one strand/ \\ -R /path/to/your/fastqfiles one -strand/ \\ -P /path/to/your/bowtie/reference/directory/ \\ -l sampleid -\\ -T 100 \\ -f /path/to/your/ICeCap/directory/ \\ -D -/path/to/your/outputsam/folder/ \\ - -To process capture Hi-C data a BED formated file listing the captured -intervals needs to be provided using the -B option. \\ - -$\bullet$ ICeCap -B path/to/baits.bed -E AAGCTT -C 1 \\ -L -/path/to/your/inputfastq/file(s) \\ -R /path/to/your/inputfastq/file(s) -\\ -P /path/to/your/bowtie/reference/directory/ \\ -l sampleid \\ -T 100 -\\ -f /path/to/your/ICeCap/directory/ \\ -D -/path/to/your/outputsam/folder/ \\ - -ICeCap will carry out a virtual digestion of the reference genome -provided (default hg19), generating a list of fragments. Multiple files -can be concatenated passing to the -L/-R flags a folder containing all -files, e.g. both the left and right strand flag, e.g. -$-L /pathR$,$-R /pathL$. The strings $1.fastq$ and $2.fastq$ are -expected on each file, file names should sort match, and total number of -reads on each strand should be equal. Make sure you submit the command -above with a suitable queuing environment, e.g. MOAB, LSF etc. - -STAGE 1 will produced SAM files listing valid ditags to be used for -subsequent analysis. A header can be found in the "data" directory. The -following output files will be produced in the output directory, e.g. -/sampleid/data (indicated with the -D option). - -File name | File contents\\ +To process sequencing data from, e.g., a non-capture Hi-C experiment, using the HindIII restriction enzyme, run in your system, as a $single$ line command, e.g.:\\ + +$\bullet$ /path/to/binary/ICeCap -E AAGCTT -C 1 \\ +-L /path/to/your/fastqfiles one strand/ \\ +-R /path/to/your/fastqfiles one strand/ \\ +-P /path/to/your/bowtie/reference/directory/ \\ +-l sampleid \\ +-T 100 \\ +-f /path/to/your/ICeCap/directory/ \\ +-D /path/to/your/outputsam/folder/ \\ + +To process capture Hi-C data a BED formated file listing the captured intervals needs to be provided using the -B option. \\ + +$\bullet$ ICeCap -B path/to/baits.bed -E AAGCTT -C 1 \\ +-L /path/to/your/inputfastq/file(s) \\ +-R /path/to/your/inputfastq/file(s) \\ +-P /path/to/your/bowtie/reference/directory/ \\ +-l sampleid \\ +-T 100 \\ +-f /path/to/your/ICeCap/directory/ \\ +-D /path/to/your/outputsam/folder/ \\ + +ICeCap will carry out a virtual digestion of the reference genome provided (default hg19), generating a list of fragments. +Multiple files can be concatenated passing to the -L/-R flags a folder containing all files, e.g. both the left and right strand flag, e.g. $-L /pathR$,$-R /pathL$. The strings $1.fastq$ and $2.fastq$ are expected on each file, file names should sort match, and total number of reads on each strand should be equal. +Make sure you submit the command above with a suitable queuing environment, e.g. MOAB, LSF etc. + +STAGE 1 will produced SAM files listing valid ditags to be used for subsequent analysis. A header can be found in the "data" directory. +The following output files will be produced in the output directory, e.g. /sampleid/data (indicated with the -D option). + +File name | File contents\\ ----------------------------------------------------------------------------------\\ -sampleid/data/SIZES | Ditag sizes.\\ sampleid/data/GSIZE | Valid ditag -sizes.\\ sampleid/data/BSIZE | Invalid ditag sizes.\\ -sampleid/data/sampleid.png | Plot of bona-fide and filtered di-tags size -distributions \\ sampleid/data/Invalid\_ditag\_chart.pdf | Pie chart -with the relative ratio of invalid di-tags filtered out. -sampleid/data/sampleid.COUNTS.txt | Statistics about the numbers of -aligned reads and valid ditags.\\ -sampleid/data/sampleid.pairs.chr*.sam.bfide | SAM-like file listing -valid ditags.\\ sampleid/data/sampleid.pairs.chr*.sam.bfide.ontarget | -SAM-like file listing valid ditags corresponding to enriched ditags in -\\ the case of capture Hi-C or all ditags in the case of non-capture -Hi-C.\\ +sampleid/data/SIZES | Ditag sizes.\\ +sampleid/data/GSIZE | Valid ditag sizes.\\ +sampleid/data/BSIZE | Invalid ditag sizes.\\ +sampleid/data/sampleid.png | Plot of bona-fide and filtered di-tags size distributions \\ +sampleid/data/Invalid\_ditag\_chart.pdf | Pie chart with the relative ratio of invalid di-tags filtered out. +sampleid/data/sampleid.COUNTS.txt | Statistics about the numbers of aligned reads and valid ditags.\\ +sampleid/data/sampleid.pairs.chr*.sam.bfide | SAM-like file listing valid ditags.\\ +sampleid/data/sampleid.pairs.chr*.sam.bfide.ontarget | SAM-like file listing valid ditags corresponding to enriched ditags in \\ + the case of capture Hi-C or all ditags in the case of non-capture Hi-C.\\ \subsection{**STAGE 2: Matrix allocation and interaction calling.} -To run this stage, use the -N option to allocate di-tags to memory and -postprocessing analysis. The -S option will run statistical analysis on -the two pools of data obtained: enriched to non-enriched (E-N) as well -as the enriched to enriched (E-E) interactions. The argument to the -S -option indicats the type of distribution that will be used as a local -background model in the three-filtered, HiCCUPs like, method. - -Example of interaction analysis in capture Hi-C data carried out on -chromosomes 1, 2 and 3. \\ ICeCap -N -l sampleid \\ -s 1 -e 3 -G 0 -Z 1 --Q path/to/mappability/files -B path/to/baits.bed -P -path/to/bowtiereference/files \\ - -Mandatory fields are the -N flag, the reference fasta file directory -(-P), the sample id (-l), that should correspond to those used in the -STAGE 1 above, and the (-f) path to the ICeCap folder. If no baits BED -file is specified (with the -B option), the pipeline will run in -non-capture mode and allocate all fragment pairs to memory. Note that -the mappability files should be in the ICeCap folder, in a folder called -$reference\_map$ or should be specified by thwe $-Q$ flag. Setting -G 0 -indicates that a restriction based (non-uniform) binning will be used. -Alternatively, if the -G option is set to 1, a uniform binning is -chosen, with a size of r*Z bp. (see the -r and -Z flags below). The -Z -parameter will corse grain the analysis. So, for example, -G 0 -Z 1 -corresponds to single fragment binning. Similarly, -G 0 -Z 4 will -correspond to a "meta-fragment" based binning, where four consecutive -fragments are combined. The -Z option can also be used with uniform -bins, e.g. -G 1 -Z 5 will correspond to a uniform binning grid of mesh -size 5*r=5kb. (default value of the -r option is $1000~bp$). -Interactions passing the FDR threshold, together with the associated -q-values can be found in the "sampleid/stats/fdr" directory for further -analysis and for plotting purposes. A Wash-U formatted file with all -significant interactions will also be generated in the output folder, as -specified by the -O option. Per fragment iWash files are grouped in -chromosome start/end subfolder(s) for individual locus analysis. + +To run this stage, use the -N option to allocate di-tags to memory and postprocessing analysis. +The -S option will run statistical analysis on the two pools of data obtained: enriched to non-enriched (E-N) as well as the enriched to enriched (E-E) interactions. +The argument to the -S option indicats the type of distribution that will be used as a local background model in the three-filtered, HiCCUPs like, method. + +Example of interaction analysis in capture Hi-C data carried out on chromosomes 1, 2 and 3. +\\ +ICeCap -N -l sampleid \\ +-s 1 -e 3 -G 0 -Z 1 -Q path/to/mappability/files -B path/to/baits.bed -P path/to/bowtiereference/files \\ + +Mandatory fields are the -N flag, the reference fasta file directory (-P), the sample id (-l), that should correspond to those used in the STAGE 1 above, and the (-f) path to the ICeCap folder. +If no baits BED file is specified (with the -B option), the pipeline will run in non-capture mode and allocate all fragment pairs to memory. +Note that the mappability files should be in the ICeCap folder, in a folder called $reference\_map$ or should be specified by thwe $-Q$ flag. +Setting -G 0 indicates that a restriction based (non-uniform) binning will be used. +Alternatively, if the -G option is set to 1, a uniform binning is chosen, with a size of r*Z bp. (see the -r and -Z flags below). +The -Z parameter will corse grain the analysis. So, for example, -G 0 -Z 1 corresponds to single fragment binning. +Similarly, -G 0 -Z 4 will correspond to a "meta-fragment" based binning, where four consecutive fragments are combined. +The -Z option can also be used with uniform bins, e.g. -G 1 -Z 5 will correspond to a uniform binning grid of mesh size 5*r=5kb. (default value +of the -r option is $1000~bp$). +Interactions passing the FDR threshold, together with the associated q-values can be found in the "sampleid/stats/fdr" directory for further analysis and for plotting purposes. A Wash-U formatted file with all significant interactions will also be generated in the output folder, as specified by the -O option. Per fragment iWash files are grouped in chromosome start/end subfolder(s) for individual locus analysis. \section{ICeCap Options:} -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ The following options can be -passed to the ICeCap program. +*******************\\ +The following options can be passed to the ICeCap program. -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ +************************************************************************************\\ **GENERAL OPTIONAL ARGUMENTS** -h, --help Print this manual and exit. @@ -172,10 +127,9 @@ passed to the ICeCap program. -B, --baits path to file path to a BED file [without header lines] listing fragments that were enriched in the capture Hi-C experimental protocol. If this option is not supplied, analysis is carried out on all fragments as in non-capture Hi-C. \\ -b Specifies if Ligation is blunt. Default for CaptureC, specify e.g. -b hic if biotin filled non blunt end ligations occur in the experimental protocol - -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -\\ **MANDATORY ARGUMENTS FOR STAGE 1** - +************************************************************************************ \\ +**MANDATORY ARGUMENTS FOR STAGE 1** + -E, CURRENT VERSION WORKING ON GATC-DpnII only. available version for any restriction site sequencing. --site-sequence nucleotide sequence string Specifies the enzyme recognition site sequence. Currently, only enzymes that cut at palindromic sequences are supported. The default value is AAGCTT, which corresponds to the HindIII recognition seuqence. @@ -183,16 +137,15 @@ passed to the ICeCap program. -C, --cut-position integer Number of bases from the start of the recognition site sequence to the cut point. - -(e.g for HindIII use -C 1) + (e.g for HindIII use -C 1) -AAGCTT- -A AGCTT- -TTGCAA- -TTGCA A- \\ + (e.g. for MboI use -C 0) -(e.g. for MboI use -C 0) - + -GATC- - GATC- -CTAG- -CTAG - \\ @@ -214,7 +167,7 @@ passed to the ICeCap program. -l Sample Name/ID of the Biological replicate.\\ -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ +*******************************************************************\\ **OPTIONAL ARGUMENTS FOR STAGE 1** -D, --output-sam folder: The output directory where the files listing ditags in SAM format, as well as intermediate processing files (in the subdirectory "BOWTIE"), will be written. This may include a prefix corresponding to the beginning of the file names. The default is the current working directory. @@ -225,7 +178,7 @@ passed to the ICeCap program. -J Number of cores used by Bowtie2. -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ +******************************************************************\\ **MANDATORY ARGUMENTS FOR STAGE 2** -N, this flag will point to STAGE 2. It does not require an argument. @@ -237,7 +190,7 @@ passed to the ICeCap program. -I Please provide a directory path here. IT should match the -D path, as given on stage 1, and corresponds to the folder where the Sample Name/ID folder and data subfolder containing the bona fide sam files generated in stage 1 are located. -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ +*****************************************************************\\ **OPTIONAL ARGUMENTS FOR STAGE 2** -o Output prefix of choice to mark a specific instance of ICeCAP. @@ -276,16 +229,13 @@ passed to the ICeCap program. -X, --dev Leave as default. Currently only pkY analysis occurs. -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\\ +**************************************************************************\\ \section{Graphical Interface} -Please make sure to have the X11 libraries running on your desktop -environment. At compile time, an executable named 'ICeCap\_plot' is -generated. Please use the command line help option. \section*{Updates} +Please make sure to have the X11 libraries running on your desktop environment. +At compile time, an executable named 'ICeCap\_plot' is generated. Please use the command line help option. +\section*{Updates} -Version 1.0-1.4 also includes graphical interface, used to plot -heatmaps, topologically associating domains, significant interactions -and Ensembl Genes. It is under current development and is based on the -ANSI-C X11 graphical interface. +Version 1.0-1.4 also includes graphical interface, used to plot heatmaps, topologically associating domains, significant interactions and Ensembl Genes. It is under current development and is based on the ANSI-C X11 graphical interface. -\\end{document}\# ICeCAP +\end{document}# ICeCAP