Skip to content

Commit 5b2dc61

Browse files
Merge pull request #40 from chloroExtractorTeam/03_representative_datasets
Fix bug that ignored circular flag
2 parents 92cbbfe + e27d1fc commit 5b2dc61

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎03_representative_datasets.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Select/design representative datasets
22
We use both simulated and real data.
33

4-
- Simulated: "perfect" datasets from *Arabidopsis thaliana* using different read lengths (150 and 250) and differenct genome:chloroplast ratios (1:10, 1:100, 1:1000)
4+
- Simulated: "perfect" datasets from *Arabidopsis thaliana* using different read lengths (150 and 250) and differenct genome:chloroplast ratios (1:10, 1:100, 1:1000, 0:1 (pure chloroplast data))
55
- Real: public, Illumina, paired, plant, DNA, random, wgs datasets from [SRA](https://www.ncbi.nlm.nih.gov/sra) where a reference chloroplast for the species is present in [CpBase](http://rocaplab.ocean.washington.edu/old_website/tools/cpbase)
66

77
## Simulated Data
@@ -33,6 +33,10 @@ simulate.sh 300 150 C circular
3333
simulate.sh 500 250 C circular
3434
seqkit sample --threads 8 --proportion 0.6 --rand-seed 91685 --out-file chrC_1.250bp.300x.fq chrC_1.250bp.500x.fq
3535
seqkit sample --threads 8 --proportion 0.6 --rand-seed 91685 --out-file chrC_2.250bp.300x.fq chrC_2.250bp.500x.fq
36+
cp chrC_1.150bp.300x.fq sim_1.150bp.0-1.fq
37+
cp chrC_1.150bp.300x.fq sim_2.150bp.0-1.fq
38+
cp chrC_1.250bp.300x.fq sim_1.250bp.0-1.fq
39+
cp chrC_1.250bp.300x.fq sim_2.250bp.0-1.fq
3640
```
3741

3842
Create datasets for 1:10, 1:100, 1:1000

‎code/simulate.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ REVPOS=$(($SEGMENT - $READLEN + 1))
1616
PROPORTION=$(echo "scale=3; $COV / (2*$READLEN)" | bc -l)
1717
SEED=91685
1818

19-
seqkit sliding --window $SEGMENT --step 1 --threads 8 TAIR10_chr${CHR}.fas | seqkit sample --threads 8 --proportion $PROPORTION --rand-seed $SEED | seqkit shuffle --threads 8 --rand-seed $SEED | seqkit split --by-part 2 --threads 8 -O chr${CHR}_${READLEN}_intermediate
19+
seqkit sliding --window $SEGMENT --step 1 --threads 8 ${CIRCULAR} TAIR10_chr${CHR}.fas | seqkit sample --threads 8 --proportion $PROPORTION --rand-seed $SEED | seqkit shuffle --threads 8 --rand-seed $SEED | seqkit split --by-part 2 --threads 8 -O chr${CHR}_${READLEN}_intermediate
2020
seqkit seq --reverse --complement --threads 8 chr${CHR}_${READLEN}_intermediate/stdin.part_002.fasta >>chr${CHR}_${READLEN}_intermediate/stdin.part_001.fasta
21-
seqkit shuffle --threads 8 --rand-seed 91685 --out-file chr${CHR}_${READLEN}_intermediate2.fa.gz chr${CHR}_${READLEN}_intermediate/stdin.part_002.fasta
21+
seqkit shuffle --threads 8 --rand-seed $SEED --out-file chr${CHR}_${READLEN}_intermediate2.fa.gz chr${CHR}_${READLEN}_intermediate/stdin.part_002.fasta
2222
rm -r chr${CHR}_${READLEN}_intermediate
2323
seqkit subseq --region 1:${READLEN} --threads 8 --line-width 0 --out-file chr${CHR}_1.${READLEN}bp.${COV}x.fa chr${CHR}_${READLEN}_intermediate2.fa.gz
2424
seqkit subseq --region ${REVPOS}:${SEGMENT} --threads 8 chr${CHR}_${READLEN}_intermediate2.fa.gz | seqkit seq --reverse --complement --line-width 0 --threads 8 --out-file chr${CHR}_2.${READLEN}bp.${COV}x.fa

0 commit comments

Comments
 (0)