<commit_before>SAM=$(wildcard *.sam)
BAM=$(SAM:%.sam=%.bam)
BAI=$(BAM:%.bam=%.bam.bai)

all: ex1.pileup.gz \
	ex2.sam.gz ex2.sam ex1.sam \
	$(BAM) $(BAI) \
	example_bai.bam

ex2.sam.gz: ex1.bam ex1.bam.bai
		samtools view -h ex1.bam | gzip > ex2.sam.gz

#%.bam: %.sam ex1.fa.fai
#	samtools import ex1.fa.fai $< $@

%.bam: %.sam
	samtools view -bS $< > $@

%.sam: %.sam.gz
	gunzip < $< > $@

ex1.fa.fai:ex1.fa
		samtools faidx ex1.fa
ex1.bam:ex1.sam.gz ex1.fa.fai
		samtools import ex1.fa.fai ex1.sam.gz ex1.bam

%.bam.bai:%.bam
		samtools index $<

ex1.pileup.gz:ex1.bam ex1.fa
		samtools pileup -cf ex1.fa ex1.bam | gzip > ex1.pileup.gz

example_unmapped_reads_no_sq.bam: example_unmapped_reads_no_sq.sam
	touch tmp.list
	samtools import tmp.list $< $@
	rm -f tmp.list

example_bai.bam: ex1.bam
	cp ex1.bam $@
	samtools index $@
	mv $@.bai example_bai.bai

clean:
	rm -fr *.bam *.bai *.fai *.pileup* \
		*~ calDepth *.dSYM pysam_*.sam \
	ex2.sam ex2.sam.gz ex1.sam
<commit_msg>fixed unit tests<commit_after>SAM=$(wildcard *.sam)
BAM=$(SAM:%.sam=%.bam)
BAI=$(BAM:%.bam=%.bam.bai)

# ex2.bam - bam file without index

all: ex1.pileup.gz \
	ex1.sam ex1.bam \
	ex2.sam.gz ex2.sam ex2.bam \
	$(BAM) $(BAI) \
	example_bai.bam

# ex2.sam - as ex1.sam, but with heaer
ex2.sam.gz: ex1.bam ex1.bam.bai
	samtools view -h ex1.bam | gzip > ex2.sam.gz

#%.bam: %.sam ex1.fa.fai
#	samtools import ex1.fa.fai $< $@

%.bam: %.sam
	samtools view -bS $< > $@

%.sam: %.sam.gz
	gunzip < $< > $@

ex1.fa.fai:ex1.fa
		samtools faidx ex1.fa
ex1.bam:ex1.sam.gz ex1.fa.fai
		samtools import ex1.fa.fai ex1.sam.gz ex1.bam

%.bam.bai:%.bam
		samtools index $<

ex1.pileup.gz:ex1.bam ex1.fa
		samtools pileup -cf ex1.fa ex1.bam | gzip > ex1.pileup.gz

example_unmapped_reads_no_sq.bam: example_unmapped_reads_no_sq.sam
	touch tmp.list
	samtools import tmp.list $< $@
	rm -f tmp.list

example_bai.bam: ex1.bam
	cp ex1.bam $@
	samtools index $@
	mv $@.bai example_bai.bai

clean:
	rm -fr *.bam *.bai *.fai *.pileup* \
		*~ calDepth *.dSYM pysam_*.sam \
	ex2.sam ex2.sam.gz ex1.sam

{'fraction_non_alphanumeric': 0.17982456140350878, 'fraction_numerical': 0.032651072124756333, 'mean_word_length': 3.0573122529644268, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057643', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1031, 'n_words': 195}