Browse code

checked out version 4.1.11

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

Gregoire Pau authored on 18/01/2016 18:49:26
Showing1 changed files
... ...
@@ -150,7 +150,7 @@ test.detectQualityInFASTQFile <- function(){
150 150
                            quality = FastqQuality("BCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHI"),
151 151
                            id      = BStringSet("read_with_all_quals/1"))
152 152
   writeFastq(shortread1, file=file1, lane='')
153
-  checkEquals(detectQualityInFASTQFile(file1), c("sanger", "solexa", "illumina1.3", "illumina1.5", "illumina1.8", "GATK-rescaled"))
153
+  checkEquals(detectQualityInFASTQFile(file1), c("solexa", "illumina1.3", "illumina1.5", "illumina1.8", "GATK-rescaled", "sanger"))
154 154
   unlink(file1)
155 155
 }
156 156
 
Browse code

version 3.13.11: - now use TxDb.Hsapiens.UCSC.hg19.knownGene's version number in the TP53 genomic feature cache file, to avoid bugs when updating TxDb.Hsapiens.UCSC.hg19.knownGene

version 3.13.10:
- added an optional which config to limit VariantTools variant calling to certain regions



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

Gregoire Pau authored on 24/03/2014 06:16:45
Showing1 changed files
... ...
@@ -154,3 +154,22 @@ test.detectQualityInFASTQFile <- function(){
154 154
   unlink(file1)
155 155
 }
156 156
 
157
+test.getObjectFilename <- function(){
158
+
159
+  expected = file.path(tempdir(), "AAA_BBB.tmp")
160
+  system(paste("touch ", expected, sep=" "))
161
+  
162
+  observed = getObjectFilename(tempdir(), "AAA")
163
+  checkEquals(observed, expected, "getObjectFilename() finds file by partial match")
164
+
165
+  observed = getObjectFilename(tempdir(), "AAA_BBB.tmp")
166
+  checkEquals(observed, expected, "getObjectFilename() finds file by complete match")
167
+
168
+  observed = getObjectFilename(tempdir(), "A+_B+.tmp")
169
+  checkEquals(observed, expected, "getObjectFilename() finds file by regexp")
170
+
171
+  observed = getObjectFilename(tempdir(), "A+_B+.X?tmp")
172
+  checkEquals(observed, expected, "getObjectFilename() finds file by regexp")
173
+
174
+  unlink(expected)
175
+}
Browse code

version 3.13.2 - activate read trimming for illumina 1.5 quality using the 'B' as qual indicator

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

Gregoire Pau authored on 03/01/2014 21:27:56
Showing1 changed files
... ...
@@ -32,6 +32,25 @@ test.FastQStreamer.getReads.pefq <- function() {
32 32
   FastQStreamer.release()
33 33
 }
34 34
 
35
+test.FastQStreamer.getReads.truncated <- function() {
36
+  ## paired-end fastq
37
+  ## setup test framework
38
+  config.update <- list(chunk_size=500)
39
+  setupTestFramework(config.filename="test-data/test_config_single_end.txt", config.update=config.update,
40
+                     testname="test.FastQStreamer.getReads.truncated")
41
+  
42
+  ## init FastQStreamer
43
+  FastQStreamer.init(input_file=getPackageFile("test-data/truncated.fastq.gz"),
44
+                     chunk_size=getConfig.integer("chunk_size"))
45
+  
46
+  ## try to read 500 reads
47
+  lreads <- try(FastQStreamer.getReads(), silent=TRUE)
48
+  checkEquals(class(lreads), "try-error")
49
+  
50
+  ## release FastQStreamer
51
+  FastQStreamer.release()
52
+}
53
+
35 54
 test.FastQStreamer.getReads.pefq.subsample <- function() {
36 55
   ## paired-end fastq with subsample
37 56
   ## setup test framework
Browse code

version 3.9.25: - VariantTools "analyzeVariants.indels" are OK

version 3.9.24
- aloow for new quality score range "GATK-rescaled" from 1-50 (33-83 in ASCII)



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

Gregoire Pau authored on 03/04/2013 19:02:34
Showing1 changed files
... ...
@@ -108,3 +108,30 @@ test.safeUnlink <- function() {
108 108
 
109 109
   setwd(currentdir)
110 110
 }
111
+
112
+test.detectQualityInFASTQFile <- function(){
113
+  tmpdir <- HTSeqGenie:::createTmpDir(prefix="test_detectQualityInFASTQFile")
114
+  file1 <- file.path(tmpdir, "1.fastq")
115
+  
116
+  shortread1 <- ShortReadQ(          DNAStringSet("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"),
117
+                           quality = FastqQuality("!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ"),
118
+                           id      = BStringSet("read_with_illumina1.8/1"))
119
+  writeFastq(shortread1, file=file1, lane='')
120
+  checkEquals(detectQualityInFASTQFile(file1), c("illumina1.8", "GATK-rescaled"))
121
+  unlink(file1)
122
+
123
+  shortread1 <- ShortReadQ(          DNAStringSet("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"),
124
+                           quality = FastqQuality(">BCBH@CAIF=B>&EFBFEBGEDHFII9HBDGHDHGFF@ICFBFBG>DGAH@KDIC1DAJ@KF?CAFBIGGBAB@C"),
125
+                           id      = BStringSet("read_with_rescaled_qual/1"))
126
+  writeFastq(shortread1, file=file1, lane='')
127
+  checkEquals(detectQualityInFASTQFile(file1), "GATK-rescaled")
128
+  unlink(file1)
129
+  
130
+  shortread1 <- ShortReadQ(          DNAStringSet("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"),
131
+                           quality = FastqQuality("BCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHIBCDEFGHI"),
132
+                           id      = BStringSet("read_with_all_quals/1"))
133
+  writeFastq(shortread1, file=file1, lane='')
134
+  checkEquals(detectQualityInFASTQFile(file1), c("sanger", "solexa", "illumina1.3", "illumina1.5", "illumina1.8", "GATK-rescaled"))
135
+  unlink(file1)
136
+}
137
+
Browse code

version 3.9.20: - preparation to BioC submission - now using detectRRNA.do: FALSE in default-config.txt

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

Gregoire Pau authored on 27/03/2013 06:13:50
Showing1 changed files
... ...
@@ -70,7 +70,7 @@ test.FastQStreamer.getReads.segz <- function() {
70 70
   ## single-end fastq.gz
71 71
   ## setup test framework
72 72
   config.update <- list(input_file="inst/test-data/reads.fastq.gz", chunk_size=10, quality_encoding="illumina1.8")
73
-  setupTestFramework(config.filename="test-data/test_config.txt", config.update=config.update,
73
+  setupTestFramework(config.filename="test-data/test_config_single_end.txt", config.update=config.update,
74 74
                      testname="test.FastQStreamer.getReads.segz")
75 75
 
76 76
   ## init FastQStreamer
Browse code

Adds TransView/ HTSeqGenie/ Rcade/ HMMcopy/ CNORode/ to the repos.

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

Marc Carlson authored on 28/09/2012 04:55:00
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,110 @@
1
+test.createTmpDir <- function(){
2
+  tmp1 <- HTSeqGenie:::createTmpDir()
3
+  checkTrue(file.exists(tmp1), "createTmpDir() creates temporary directory")
4
+
5
+  tmp2 <- HTSeqGenie:::createTmpDir()
6
+  checkTrue(file.exists(tmp1))
7
+  checkTrue(tmp1 != tmp2, "createTmpDir does return uniq dir names")
8
+  unlink(tmp2, recursive=TRUE)
9
+  unlink(tmp1, recursive=TRUE)
10
+
11
+  tmp3 <- HTSeqGenie:::createTmpDir(prefix='test123_')
12
+  checkTrue(file.exists(tmp3), "createTmpDir() works with a prefix")
13
+  unlink(tmp3, recursive=TRUE)
14
+}
15
+  
16
+test.FastQStreamer.getReads.pefq <- function() {
17
+  ## paired-end fastq
18
+  ## setup test framework
19
+  config.update <- list(chunk_size=10)
20
+  setupTestFramework(config.filename="test-data/test_config.txt", config.update=config.update,
21
+                     testname="test.FastQStreamer.getReads.pefq")
22
+
23
+  ## init FastQStreamer
24
+  FastQStreamer.init(input_file=getConfig("input_file"), input_file2=getConfig("input_file2"),
25
+                     chunk_size=getConfig.integer("chunk_size"))
26
+
27
+  ## read 10 reads
28
+  lreads <- FastQStreamer.getReads()
29
+  checkEquals(length(lreads[[2]]), 10, "FastQStreamer.getReads() doesn't return 10 reads")
30
+  
31
+  ## release FastQStreamer
32
+  FastQStreamer.release()
33
+}
34
+
35
+test.FastQStreamer.getReads.pefq.subsample <- function() {
36
+  ## paired-end fastq with subsample
37
+  ## setup test framework
38
+  config.update <- list(chunk_size=100, subsample_nbreads=17)
39
+  setupTestFramework(config.filename="test-data/test_config.txt", config.update=config.update,
40
+                     testname="test.FastQStreamer.getReads.pefq.subsample")
41
+
42
+  ## init FastQStreamer
43
+  FastQStreamer.init(input_file=getConfig("input_file"), input_file2=getConfig("input_file2"),
44
+                     chunk_size=getConfig.integer("chunk_size"),
45
+                     subsample_nbreads=getConfig.integer("subsample_nbreads"))
46
+
47
+  ## read 17 reads
48
+  lreads <- FastQStreamer.getReads()
49
+  checkEquals(length(lreads[[2]]), 17, "FastQStreamer.getReads() doesn't return 17 reads")
50
+  
51
+  ## release FastQStreamer
52
+  FastQStreamer.release()
53
+  lreads
54
+}
55
+
56
+test.FastQStreamer.subsampler.isdeterministic <- function() {
57
+  ## check if the subsampler is deterministic
58
+  lreads1 <- test.FastQStreamer.getReads.pefq.subsample()
59
+  lreads2 <- test.FastQStreamer.getReads.pefq.subsample()
60
+  
61
+  ## convert to character strings
62
+  reads1 <- as.character(sread(lreads1[[1]]))
63
+  reads2 <- as.character(sread(lreads2[[1]]))
64
+
65
+  ## check
66
+  checkEquals(reads1, reads2, "FastQStreamer is not deterministic")
67
+}
68
+
69
+test.FastQStreamer.getReads.segz <- function() {
70
+  ## single-end fastq.gz
71
+  ## setup test framework
72
+  config.update <- list(input_file="inst/test-data/reads.fastq.gz", chunk_size=10, quality_encoding="illumina1.8")
73
+  setupTestFramework(config.filename="test-data/test_config.txt", config.update=config.update,
74
+                     testname="test.FastQStreamer.getReads.segz")
75
+
76
+  ## init FastQStreamer
77
+  FastQStreamer.init(input_file=getConfig("input_file"), input_file2=getConfig("input_file2"),
78
+                     chunk_size=getConfig.integer("chunk_size"))
79
+
80
+  ## read 10 reads
81
+  lreads <- FastQStreamer.getReads()
82
+  checkEquals(length(lreads[[1]]), 10, "FastQStreamer.getReads() doesn't return 10 reads")
83
+
84
+  ## release FastQStreamer
85
+  FastQStreamer.release()
86
+}
87
+
88
+test.writeAudit <- function() {
89
+  ## setup test framework
90
+  config.filename <- "test-data/test_config.txt"
91
+  setupTestFramework(config.filename=config.filename, testname="test.writeAudit")
92
+  writeAudit("audit.txt")
93
+}
94
+
95
+test.safeUnlink <- function() {
96
+  tmpdir <- tempfile()
97
+  dir.create(tmpdir)
98
+  currentdir <- getwd()
99
+  setwd(tmpdir)
100
+
101
+  ## create blob/tk and sblob linking to blob
102
+  system("mkdir blob ; touch blob/tk ; ln -s blob sblob")
103
+
104
+  ## safeUnlink should not delete tk!
105
+  safeUnlink("sblob")
106
+  checkTrue(!file.exists("sblob"), "safeUnlink did not work!")
107
+  checkTrue(file.exists("blob/tk"), "safeUnlink did not work!")
108
+
109
+  setwd(currentdir)
110
+}