pysam
Work with genomic sequencing files
متاح أيضًا من: davila7
Process and analyze DNA sequencing data with tools for reading BAM, VCF, and FASTQ files. Extract genomic regions, calculate coverage statistics, and integrate multiple file types for comprehensive variant analysis.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "pysam". Open a BAM file and show coverage statistics for chromosome 1
النتيجة المتوقعة:
- Chromosome 1 statistics:
- Total reads: 1,245,678
- Mapped reads: 1,198,432 (96.2%)
- Mean coverage: 32.4x
- Regions below 10x coverage: 5,234 positions
استخدام "pysam". Filter variants by quality and depth
النتيجة المتوقعة:
- Filtered 12,456 variants to 3,892 high-quality variants
- Applied filters: QUAL > 30, DP > 10, MQ > 40
- Variants written to filtered.vcf
استخدام "pysam". Extract sequences around variant positions
النتيجة المتوقعة:
- Extracted 100bp sequences for 847 variants
- Sequences written to variant_contexts.fasta
- Flanking region: +/- 50bp from each variant position
التدقيق الأمني
آمنAll 447 static findings are FALSE POSITIVES caused by bioinformatics terminology being misinterpreted as security-relevant patterns. The scanner flags 'SAM' as Windows Security Account Manager when it means Sequence Alignment/Map format, and samtools/bcftools as network scanning tools when they are legitimate bioinformatics command-line utilities. The skill contains only documentation and code examples for legitimate genomic data processing. No actual malicious code, command injection, credential access, or network exfiltration patterns exist.
عوامل الخطر
⚙️ الأوامر الخارجية (3)
📁 الوصول إلى نظام الملفات (2)
درجة الجودة
ماذا يمكنك بناءه
Variant analysis workflow
Extract and filter genetic variants from VCF files, annotate with read coverage from BAM files
Coverage analysis
Calculate per-base coverage, identify low-coverage regions, generate coverage tracks for visualization
Quality control pipeline
Validate sequencing data, check reference consistency, filter reads by quality thresholds
جرّب هذه الموجهات
Use pysam to open example.bam and print all reads overlapping chr1 positions 1000-2000
Open variants.vcf and print all variants on chr2 with quality score above 30
Calculate per-base coverage for chromosome 1 positions 100000-200000 using pileup analysis
Open reference.fasta and extract the sequence for gene ABC on chr5 from position 10000 to 11000
أفضل الممارسات
- Always use indexed BAM files for random access operations to improve performance
- Remember pysam uses 0-based coordinates while VCF files use 1-based coordinates
- Use pileup() for column-wise coverage analysis instead of repeated fetch() calls
تجنب
- Loading entire BAM files into memory instead of using iterator-based processing
- Ignoring coordinate system differences between pysam and VCF file formats
- Processing large files without creating index files for random access