|
149 | 149 | $seq_id++;
|
150 | 150 | }
|
151 | 151 |
|
152 |
| -## DRAGEN sample sheet |
153 |
| -my $dragen_ss = File::Spec->join($out_dir, 'demux_sample_sheet.csv'); |
154 |
| -my $ss_fh = IO::File->new(">$dragen_ss") or die "Fail to write to $dragen_ss"; |
155 |
| -$ss_fh->print("[Settings]\n"); |
156 |
| -$ss_fh->print("AdapterBehavior,trim\n"); |
157 |
| -$ss_fh->print("AdapterRead1,AAGATCGGAAGAGCACACGTCTGAACTCC+CAGATCGGAAGAGCACACGTCTGAACTCC+GAGATCGGAAGAGCACACGTCTGAACTCC+TAGATCGGAAGAGCACACGTCTGAACTCC\n"); |
158 |
| -$ss_fh->print("AdapterRead2,AAAGATCGGAAGAGCGTCGTGTAGGGAAA+CAAGATCGGAAGAGCGTCGTGTAGGGAAA+GAAGATCGGAAGAGCGTCGTGTAGGGAAA+TAAGATCGGAAGAGCGTCGTGTAGGGAAA\n"); |
159 |
| -$ss_fh->print("OverrideCycles,N1Y150;I8N2;U10;N1Y150\n"); |
160 |
| -$ss_fh->print("[Data]\n"); |
161 |
| -$ss_fh->print("Lane,Sample_ID,Sample_Name,Sample_Project,index,index2\n"); |
162 |
| -$ss_fh->print($ds_str); |
163 |
| -$ss_fh->close; |
164 |
| - |
165 |
| -## Sample Index |
166 |
| -my $si = File::Spec->join($out_dir, 'sample_index'); |
167 |
| -my $si_fh = IO::File->new(">$si") or die "Fail to write to $si"; |
168 |
| -$si_fh->print($si_str); |
169 |
| -$si_fh->close; |
170 |
| - |
171 | 152 | ## Get RunInfoString
|
172 | 153 | my $run_xml = File::Spec->join($rundir, 'RunParameters.xml');
|
173 | 154 | unless (-s $run_xml) {
|
|
207 | 188 | }
|
208 | 189 | $xml_fh->close;
|
209 | 190 |
|
| 191 | +## DRAGEN sample sheet |
| 192 | +my $num_N; |
| 193 | +if ($index1cycle == 19) { |
| 194 | + $num_N = 11; |
| 195 | +} |
| 196 | +elsif ($index1cycle == 10) { |
| 197 | + $num_N = 2; |
| 198 | +} |
| 199 | +else { |
| 200 | + die "Invalid index1cycle $index1cycle"; |
| 201 | +} |
| 202 | + |
| 203 | +my $dragen_ss = File::Spec->join($out_dir, 'demux_sample_sheet.csv'); |
| 204 | +my $ss_fh = IO::File->new(">$dragen_ss") or die "Fail to write to $dragen_ss"; |
| 205 | +$ss_fh->print("[Settings]\n"); |
| 206 | +$ss_fh->print("AdapterBehavior,trim\n"); |
| 207 | +$ss_fh->print("AdapterRead1,AAGATCGGAAGAGCACACGTCTGAACTCC+CAGATCGGAAGAGCACACGTCTGAACTCC+GAGATCGGAAGAGCACACGTCTGAACTCC+TAGATCGGAAGAGCACACGTCTGAACTCC\n"); |
| 208 | +$ss_fh->print("AdapterRead2,AAAGATCGGAAGAGCGTCGTGTAGGGAAA+CAAGATCGGAAGAGCGTCGTGTAGGGAAA+GAAGATCGGAAGAGCGTCGTGTAGGGAAA+TAAGATCGGAAGAGCGTCGTGTAGGGAAA\n"); |
| 209 | +$ss_fh->print('OverrideCycles,N1Y150;I8N'.$num_N.";U10;N1Y150\n"); |
| 210 | +$ss_fh->print("[Data]\n"); |
| 211 | +$ss_fh->print("Lane,Sample_ID,Sample_Name,Sample_Project,index,index2\n"); |
| 212 | +$ss_fh->print($ds_str); |
| 213 | +$ss_fh->close; |
| 214 | + |
| 215 | +## Sample Index |
| 216 | +my $si = File::Spec->join($out_dir, 'sample_index'); |
| 217 | +my $si_fh = IO::File->new(">$si") or die "Fail to write to $si"; |
| 218 | +$si_fh->print($si_str); |
| 219 | +$si_fh->close; |
| 220 | + |
210 | 221 | my $run_info_str = join ',', $runid, $instr, $side, $fcmode, $wftype, $R1cycle, $index1cycle, $index2cycle, $R2cycle;
|
211 | 222 |
|
212 | 223 | ## Input JSON
|
|
0 commit comments