-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating readme and including test with makefile
- Loading branch information
Showing
3 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# bam2cram | ||
A repository to convert BAM->CRAM files | ||
|
||
## run examples | ||
|
||
``` | ||
#using a tsv file, with custom working directory | ||
nextflow run main.nf --bam_csv test/bams.txt --fasta test/ref.fa --output_folder csv2 -w tmp | ||
#using a directory with bams | ||
nextflow run main.nf --bams test --fasta test/ref.fa --output_folder dirs_bam | ||
``` | ||
### tsv file | ||
A tabular file with the following colums: | ||
|
||
``` | ||
label bam index | ||
S4 /path/S4.bam /path/S4.bam.bai | ||
S3 /path/S3.bam /path/S3.bam.bai | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.DELETE_ON_ERROR: | ||
|
||
${PREF}.R1.fq.gz: | ||
wgsim ref.fa ${PREF}.R1.fq ${PREF}.R2.fq 2>${PREF}.wgsim.err >${PREF}.wgsim.log | ||
gzip ${PREF}.R2.fq | ||
gzip ${PREF}.R1.fq | ||
$(PREF).bam:${PREF}.R1.fq.gz | ||
bwa mem -R '@RG\tID:${PREF}\tSM:${PREF}' ref.fa ${PREF}.R1.fq.gz ${PREF}.R2.fq.gz 2>${PREF}.bwa.err | samtools view -b - | samtools sort -o $@ - | ||
samtools index $@ | ||
all:$(PREF).bam | ||
|