Browse code

- Fix assignReads() when reads are paired-end. - Update precomputed results used in the vignette. - Address some other minor issues in the vignette.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SplicingGraphs@92578 bc3139a8-67e5-0310-9ffc-ced21a209358

Herve Pages authored on 17/07/2014 02:44:19
Showing 5 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: SplicingGraphs
2 2
 Title: Create, manipulate, visualize splicing graphs, and assign RNA-seq reads
3 3
 	to them
4
-Version: 1.5.1
4
+Version: 1.5.2
5 5
 Author: D. Bindreither, M. Carlson, M. Morgan, H. Pages
6 6
 License: Artistic-2.0
7 7
 Description: This package allows the user to create, manipulate, and visualize
... ...
@@ -11,8 +11,8 @@ Description: This package allows the user to create, manipulate, and visualize
11 11
         different ways.
12 12
 Maintainer: H. Pages <[email protected]>
13 13
 Depends: BiocGenerics,
14
-	 S4Vectors (>= 0.0.1), IRanges (>= 1.99.1), GenomicRanges (>= 1.17.7),
15
-	 GenomicFeatures (>= 1.17.3), GenomicAlignments (>= 1.1.4),
14
+	 S4Vectors (>= 0.1.0), IRanges (>= 1.99.21), GenomicRanges (>= 1.17.22),
15
+	 GenomicFeatures (>= 1.17.3), GenomicAlignments (>= 1.1.22),
16 16
 	 Rgraphviz (>= 2.3.7)
17 17
 Imports: methods, utils, igraph,
18 18
 	 BiocGenerics,
... ...
@@ -118,7 +118,7 @@ assignReads <- function(sg, reads, sample.name=NA)
118 118
     } else {
119 119
         ## Paired-end reads. We produce a GRangesList object with 2 ranges
120 120
         ## per top-level elements.
121
-        reads2 <- GenomicRanges:::fillGaps(reads)
121
+        reads2 <- GenomicAlignments:::fillJunctionGaps(reads)
122 122
     }
123 123
 
124 124
     sg@genes@unlistData <- .assignSubfeatureHits(reads2, ex_by_tx, ov1,
... ...
@@ -1,5 +1,5 @@
1 1
 %\VignetteIndexEntry{Splicing graphs and RNA-seq data}
2
-%\VignetteDepends{SplicingGraphs,TxDb.Hsapiens.UCSC.hg19.knownGene,RNAseqData.HNRNPC.bam.chr14,Rsamtools}
2
+%\VignetteDepends{SplicingGraphs,TxDb.Hsapiens.UCSC.hg19.knownGene,RNAseqData.HNRNPC.bam.chr14,Rsamtools,GenomicAlignments,Gviz}
3 3
 %\VignetteKeywords{Annotation}
4 4
 %\VignettePackage{SplicingGraphs}
5 5
 \documentclass{article}
... ...
@@ -825,7 +825,7 @@ package:
825 825
 
826 826
 <<quickBamFlagSummary>>=
827 827
 library(Rsamtools)
828
-quickBamFlagSummary(bam_files[1], mainGroupsOnly=TRUE)
828
+quickBamFlagSummary(bam_files[1], main.groups.only=TRUE)
829 829
 @
830 830
 
831 831
 Doing this for the 8 BAM files confirms that all the reads in the
... ...
@@ -855,9 +855,9 @@ records won't be paired and will be returned in a \Rclass{GAlignments} object.
855 855
 We can use the \Rcode{assignReads} function to assign reads to the
856 856
 the exonic and intronic edges of \Rcode{sg}. The same read
857 857
 can be assigned to more than one exonic or intronic edge. For example,
858
-a junction read with 1 gap (i.e., 1 \Rcode{N} in its CIGAR) can be assigned
859
-to an intron and its 2 flanking exons, and this can happen for one or more
860
-transcripts, from the same gene or from different genes.
858
+a junction read with 1 junction (i.e., 1 \Rcode{N} in its CIGAR) can be
859
+assigned to an intron and its 2 flanking exons, and this can happen for
860
+one or more transcripts, from the same gene or from different genes.
861 861
 
862 862
 We're going to loop on the BAM files to assign the reads from 1 run
863 863
 at a time. When we load the files, we want to filter out secondary
... ...
@@ -928,25 +928,25 @@ head(edge_data[ , c("sgedge_id", "ERR127306.hits")])
928 928
 
929 929
 For the purpose of explaining how reads from run \Rcode{ERR127306}
930 930
 were assigned to the edges of gene 3183, we load the reads that are
931
-in the region of that gene and have at least 1 gap:
931
+in the region of that gene and contain at least 1 junction:
932 932
 
933 933
 <<load_reads_in_3183_region>>=
934 934
 param <- ScanBamParam(flag=flag0, which=range(unlist(sg[["3183"]])))
935 935
 reads <- readGAlignmentPairs(bam_files[1], use.names=TRUE, param=param)
936
-gapped_reads <- reads[njunc(first(reads)) + njunc(last(reads)) != 0L]
936
+junction_reads <- reads[njunc(first(reads)) + njunc(last(reads)) != 0L]
937 937
 @
938 938
 
939 939
 and we plot the genomic region chr14:21675000-21702000:
940 940
 
941 941
 <<plotTranscripts_sg_3183_and_reads,eval=FALSE>>=
942
-plotTranscripts(sg[["3183"]], reads=gapped_reads, from=21675000, to=21702000)
942
+plotTranscripts(sg[["3183"]], reads=junction_reads, from=21675000, to=21702000)
943 943
 @
944 944
 
945 945
 The resulting plot is shown on figure \ref{img:3183-transcripts-and-reads}.
946 946
 
947 947
 <<plotTranscripts_sg_3183_and_reads_as_pdf,echo=FALSE,results=hide>>=
948 948
 pdf("3183-transcripts-and-reads.pdf", width=12, height=12)
949
-plotTranscripts(sg[["3183"]], reads=gapped_reads, from=21675000, to=21702000)
949
+plotTranscripts(sg[["3183"]], reads=junction_reads, from=21675000, to=21702000)
950 950
 dev.off()
951 951
 @
952 952
 \begin{figure}[!htbp]
... ...
@@ -965,12 +965,12 @@ Figure \ref{img:3183-transcripts-and-reads-zoom} is a zoom on genomic region
965 965
 chr14:21698400-21698600 that was obtained with:
966 966
 
967 967
 <<plotTranscripts_sg_3183_and_reads_zoom,eval=FALSE>>=
968
-plotTranscripts(sg[["3183"]], reads=gapped_reads, from=21698400, to=21698600)
968
+plotTranscripts(sg[["3183"]], reads=junction_reads, from=21698400, to=21698600)
969 969
 @
970 970
 
971 971
 <<plotTranscripts_sg_3183_and_reads_zoom_as_pdf,echo=FALSE,results=hide>>=
972 972
 pdf("3183-transcripts-and-reads-zoom.pdf", width=12, height=12)
973
-plotTranscripts(sg[["3183"]], reads=gapped_reads, from=21698400, to=21698600)
973
+plotTranscripts(sg[["3183"]], reads=junction_reads, from=21698400, to=21698600)
974 974
 dev.off()
975 975
 @
976 976
 \begin{figure}[!htbp]
977 977
Binary files a/vignettes/precomputed_results/sg_with_bubbles.rda and b/vignettes/precomputed_results/sg_with_bubbles.rda differ
978 978
Binary files a/vignettes/precomputed_results/sg_with_reads.rda and b/vignettes/precomputed_results/sg_with_reads.rda differ