Skip to content

Commit

Permalink
Consolidating steps in vc-test-run
Browse files Browse the repository at this point in the history
  • Loading branch information
tefirman committed Dec 13, 2024
1 parent 75ee460 commit a81a837
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/variant-calling-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,8 @@ jobs:
gatk ValidateVariants -V mills_1000G.vcf.gz -R ref.fasta
gatk ValidateVariants -V known_indels.vcf.gz -R ref.fasta
# Navigating back to original directory
cd ../../
- name: Generate test BAM
run: |
# Create a test BAM with unmapped reads
cat << EOF > test/data/test.sam
cat << EOF > test.sam
@HD VN:1.6 SO:queryname
@SQ SN:chr20 LN:63025520
@RG ID:test SM:test_sample PL:ILLUMINA LB:lib1 PU:unit1
Expand All @@ -217,21 +212,24 @@ jobs:
EOF
# Convert SAM to BAM and proper sorting
samtools view -b test/data/test.sam > test/data/test.unsorted.bam
samtools sort -n test/data/test.unsorted.bam > test/data/test.unmapped.bam
samtools view -b test.sam > test.unsorted.bam
samtools sort -n test.unsorted.bam > test.unmapped.bam
# Debug: Check the BAM
echo "=== Checking final BAM structure ==="
samtools view -H test/data/test.unmapped.bam
samtools view -H test.unmapped.bam
echo "=== First few reads ==="
samtools view test/data/test.unmapped.bam | head -n 2
samtools view test.unmapped.bam | head -n 2
# Clean up intermediate files
rm test/data/test.sam test/data/test.unsorted.bam
rm test.sam test.unsorted.bam
# Validate BAM file
echo "=== Validating BAM file ==="
gatk ValidateSamFile -I test/data/test.unmapped.bam
gatk ValidateSamFile -I test.unmapped.bam
# Navigating back to original directory
cd ../../
- name: Run test workflow
run: |
Expand Down

0 comments on commit a81a837

Please sign in to comment.