# SpatialSNV
A novel method for calling and analyzing SNVs from spatial transcriptomics data.
---
We divided the process of calling mutations from spatial transcriptomics data into two parts: **Data Preprocessing** and **Data Analysis**.
All analyzed jupyter notebooks are saved in the `article` folder
## Install
To be determined
## Data Preprocessing
### Splitting BAM File by Chromosome for Speed Up (Optional)
```bash
spatialsnvtools SplitChromBAM -b demo.bam –s demo –o demo_split -@ 10 –only_autosome
```
**Options:**
- `-b, --bam FILE`
BAM file that needs to be split by chromosome **[required]**
- `-s, --sample TEXT`
Sample ID **[required]**
- `-o, --outdir TEXT`
Output directory for the split BAM files **[required]**
- `-@, --threads INTEGER`
Sets the number of threads
- `--only_autosome`
Only analyze autosomes
- `--help`
Show this message and exit.
### Mutation Calling Data Preprocessing
> 10x or drop-seq
```bash
spatialsnvtools PerpareBAMforCalling -b demo.bam -o process_out -s demo -c 'CR' -u 'UR' -@ 10 --fasta GRCh38.p12.genome.fa --dbsnp dbsnp.chr9.hg38.vcf.gz --removetmp --picard $pathtopicard/picard.jar --gatk $pathtogatk/gatk --samtools $pathtosamtools/samtools
```
> stereo-seq
```bash
spatialsnvtools PerpareBAMforCalling -b demo.stereo.bam -o stereo_process_out -s stereo_demo --stereo --gem demo.gem.gz -x 0 -y 0 -@ 10 --fasta GRCh38.p12.genome.fa --dbsnp dbsnp.chr9.hg38.vcf.gz --removetmp --picard $pathtopicard/picard.jar --gatk $pathtogatk/gatk --samtools $pathtosamtools/samtools
```
**Options:**
- `-b, --bam FILE`
BAM file that needs preprocessing **[required]**
- `-o, --outdir TEXT`
Output directory for the preprocessing results **[required]**
- `-s, --proxy TEXT`
Sample ID **[required]**
- `-f, --fasta FILE`
Reference FASTA used for mutation calling **[required]**
- `-d, --dbsnp FILE`
dbSNP file used for BQSR **[required]**
- `-c, --barcode TEXT`
Cell Barcode in BAM file (e.g., `CR` for 10X Genomics)
- `-u, --umi TEXT`
UMI (Molecular Barcodes) in BAM file (e.g., `UR` for 10X Genomics)
- `--stereo`
Ensure that your data is stereo (barcode is `Cx` and `Cy`)
- `--gem TEXT`
GEM file matching your raw stereo BAM
- `-x, --xsetoff INTEGER`
`gem_x + x_offset = bam_x`
- `-y, --ysetoff INTEGER`
`gem_y + y_offset = bam_y`
- `--tmpdir TEXT`
Specify a temporary directory
- `-@, --threads INTEGER`
Sets the number of threads
- `--samtools TEXT`
Specify the path to `samtools`, if not specified, automatically detected
- `--picard TEXT`
Specify the path to `picard.jar`, if not specified, automatically detected
- `--gatk TEXT`
Specify the path to `GATK`, if not specified, automatically detected
- `--removetmp`
Remove all temporary files
- `--help`
Show this message and exit.
### SNV Calling on Preprocessed BAM Files
```bash
spatialsnvtools SNVCalling -b demo.processed.bam -s demo -o demo.vcf.gz -f GRCh38.p12.genome.fa --pon 1000g_pon.hg38.vcf.gz --germline af-only-gnomad.hg38.vcf.gz
```
**Options:**
- `-s, --sample TEXT`
Sample ID (e.g., `-b example.bam1 -b example.bam2`) **[required]**
- `-b, --bam FILE`
BAM file(s) with index (e.g., `-b example.bam1 -b example.bam2`) **[required]**
- `-o, --outvcf TEXT`
Output VCF file **[required]**
- `-f, --fasta FILE`
Reference FASTA file **[required]**
- `--pon FILE`
Panel of Normals (PON) file
- `--germline FILE`
Germline source file
- `--gatk TEXT`
Specify the path to `GATK`
- `-L, --chrom TEXT`
Specify chromosome(s) to analyze
- `--help`
Show this message and exit.
### Traceback SNVs to Spatial Transcriptomics
> 10x or drop-seq
```bash
spatialsnvtools CallBack --bam demo.processed.bam --vcf demo.vcf.gz -o demo_matrix -s demo --tmpdir demo_tmp --only_autosome -c "CB" -u "UB" -@ 1
```
> stereo-seq
```bash
spatialsnvtools CallBack --bam demo.stereo.bam --vcf demo.stereo.vcf.gz -o demo_stereo_matrix -s demo_stereo --tmpdir demo_stereo_tmp --stereo -x 0 -y 0 --binsize 100 --only_autosome -@ 1 --umi UM --removetmp
```
**Options:**
- `-b, --bam FILE`
BAM file(s) with index (e.g., `-b example.bam1 -b example.bam2`) **[required]**
- `-v, --vcf FILE`
VCF file for SNV data **[required]**
- `-s, --sample TEXT`
Sample ID **[required]**
- `-o, --outdir TEXT`
Output directory **[required]**
- `--tmpdir TEXT`
Specify a temporary directory
- `--only_autosome`
Only analyze autosomes
- `--stereo`
Ensure that your data is stereo (barcode is `Cx` and `Cy`)
- `-c, --barcode TEXT`
Cell Barcode in BAM file (e.g., `CR` for 10X Genomics)
- `-u, --umi TEXT`
UMI (Molecular Barcodes) in BAM file (e.g., `UR` for 10X Genomics)
- `-@, --threads INTEGER`
Sets the number of threads
- `--qmap INTEGER`
Sets the number of qmap
- `-x, --xsetoff INTEGER`
`gem_x + x_offset = bam_x`
- `-y, --ysetoff INTEGER`
`gem_y + y_offset = bam_y`
- `--binsize INTEGER`
Set the bin size
- `--removetmp`
Remove all temporary files
- `--help`
Show this message and exit.
## Data Analysis
To be determined
Raw data
{
"_id": null,
"home_page": "https://https://github.com/ly4dsg/SpatialSNV",
"name": "spatialsnv",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Yi Liu",
"author_email": "liuyi6@genomics.cn",
"download_url": "https://files.pythonhosted.org/packages/2a/2c/922990a8ab2fe91b41ce988ff199500682d76adc622f819a8198b1a56408/spatialsnv-1.0.0.tar.gz",
"platform": null,
"description": "# SpatialSNV\n\nA novel method for calling and analyzing SNVs from spatial transcriptomics data.\n\n---\n\nWe divided the process of calling mutations from spatial transcriptomics data into two parts: **Data Preprocessing** and **Data Analysis**. \n\nAll analyzed jupyter notebooks are saved in the `article` folder\n\n## Install\nTo be determined\n\n## Data Preprocessing\n\n### Splitting BAM File by Chromosome for Speed Up (Optional)\n\n```bash\nspatialsnvtools SplitChromBAM -b demo.bam \u2013s demo \u2013o demo_split -@ 10 \u2013only_autosome\n\n```\n\n**Options:**\n- `-b, --bam FILE` \n BAM file that needs to be split by chromosome **[required]**\n- `-s, --sample TEXT` \n Sample ID **[required]**\n- `-o, --outdir TEXT` \n Output directory for the split BAM files **[required]**\n- `-@, --threads INTEGER` \n Sets the number of threads\n- `--only_autosome` \n Only analyze autosomes\n- `--help` \n Show this message and exit.\n\n\n### Mutation Calling Data Preprocessing\n\n> 10x or drop-seq\n```bash\nspatialsnvtools PerpareBAMforCalling -b demo.bam -o process_out -s demo -c 'CR' -u 'UR' -@ 10 --fasta GRCh38.p12.genome.fa --dbsnp dbsnp.chr9.hg38.vcf.gz --removetmp --picard $pathtopicard/picard.jar --gatk $pathtogatk/gatk --samtools $pathtosamtools/samtools\n```\n> stereo-seq\n```bash\nspatialsnvtools PerpareBAMforCalling -b demo.stereo.bam -o stereo_process_out -s stereo_demo --stereo --gem demo.gem.gz -x 0 -y 0 -@ 10 --fasta GRCh38.p12.genome.fa --dbsnp dbsnp.chr9.hg38.vcf.gz --removetmp --picard $pathtopicard/picard.jar --gatk $pathtogatk/gatk --samtools $pathtosamtools/samtools\n```\n\n**Options:**\n- `-b, --bam FILE` \n BAM file that needs preprocessing **[required]**\n- `-o, --outdir TEXT` \n Output directory for the preprocessing results **[required]**\n- `-s, --proxy TEXT` \n Sample ID **[required]**\n- `-f, --fasta FILE` \n Reference FASTA used for mutation calling **[required]**\n- `-d, --dbsnp FILE` \n dbSNP file used for BQSR **[required]**\n- `-c, --barcode TEXT` \n Cell Barcode in BAM file (e.g., `CR` for 10X Genomics)\n- `-u, --umi TEXT` \n UMI (Molecular Barcodes) in BAM file (e.g., `UR` for 10X Genomics)\n- `--stereo` \n Ensure that your data is stereo (barcode is `Cx` and `Cy`)\n- `--gem TEXT` \n GEM file matching your raw stereo BAM\n- `-x, --xsetoff INTEGER` \n `gem_x + x_offset = bam_x`\n- `-y, --ysetoff INTEGER` \n `gem_y + y_offset = bam_y`\n- `--tmpdir TEXT` \n Specify a temporary directory\n- `-@, --threads INTEGER` \n Sets the number of threads\n- `--samtools TEXT` \n Specify the path to `samtools`, if not specified, automatically detected\n- `--picard TEXT` \n Specify the path to `picard.jar`, if not specified, automatically detected\n- `--gatk TEXT` \n Specify the path to `GATK`, if not specified, automatically detected\n- `--removetmp` \n Remove all temporary files\n- `--help` \n Show this message and exit.\n \n### SNV Calling on Preprocessed BAM Files\n```bash\nspatialsnvtools SNVCalling -b demo.processed.bam -s demo -o demo.vcf.gz -f GRCh38.p12.genome.fa --pon 1000g_pon.hg38.vcf.gz --germline af-only-gnomad.hg38.vcf.gz\n```\n\n\n**Options:**\n- `-s, --sample TEXT` \n Sample ID (e.g., `-b example.bam1 -b example.bam2`) **[required]**\n- `-b, --bam FILE` \n BAM file(s) with index (e.g., `-b example.bam1 -b example.bam2`) **[required]**\n- `-o, --outvcf TEXT` \n Output VCF file **[required]**\n- `-f, --fasta FILE` \n Reference FASTA file **[required]**\n- `--pon FILE` \n Panel of Normals (PON) file\n- `--germline FILE` \n Germline source file \n- `--gatk TEXT` \n Specify the path to `GATK`\n- `-L, --chrom TEXT` \n Specify chromosome(s) to analyze\n- `--help` \n Show this message and exit.\n\n### Traceback SNVs to Spatial Transcriptomics\n\n> 10x or drop-seq\n```bash\nspatialsnvtools CallBack --bam demo.processed.bam --vcf demo.vcf.gz -o demo_matrix -s demo --tmpdir demo_tmp --only_autosome -c \"CB\" -u \"UB\" -@ 1\n```\n> stereo-seq\n```bash\nspatialsnvtools CallBack --bam demo.stereo.bam --vcf demo.stereo.vcf.gz -o demo_stereo_matrix -s demo_stereo --tmpdir demo_stereo_tmp --stereo -x 0 -y 0 --binsize 100 --only_autosome -@ 1 --umi UM --removetmp\n```\n\n**Options:**\n- `-b, --bam FILE` \n BAM file(s) with index (e.g., `-b example.bam1 -b example.bam2`) **[required]**\n- `-v, --vcf FILE` \n VCF file for SNV data **[required]**\n- `-s, --sample TEXT` \n Sample ID **[required]**\n- `-o, --outdir TEXT` \n Output directory **[required]**\n- `--tmpdir TEXT` \n Specify a temporary directory\n- `--only_autosome` \n Only analyze autosomes\n- `--stereo` \n Ensure that your data is stereo (barcode is `Cx` and `Cy`)\n- `-c, --barcode TEXT` \n Cell Barcode in BAM file (e.g., `CR` for 10X Genomics)\n- `-u, --umi TEXT` \n UMI (Molecular Barcodes) in BAM file (e.g., `UR` for 10X Genomics)\n- `-@, --threads INTEGER` \n Sets the number of threads\n- `--qmap INTEGER` \n Sets the number of qmap\n- `-x, --xsetoff INTEGER` \n `gem_x + x_offset = bam_x`\n- `-y, --ysetoff INTEGER` \n `gem_y + y_offset = bam_y`\n- `--binsize INTEGER` \n Set the bin size\n- `--removetmp` \n Remove all temporary files\n- `--help` \n Show this message and exit.\n\n\n## Data Analysis\nTo be determined\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A toolkit for spatial SNV analysis",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://https://github.com/ly4dsg/SpatialSNV"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2a2c922990a8ab2fe91b41ce988ff199500682d76adc622f819a8198b1a56408",
"md5": "acc9339927cbcde58f1deb0ee6a86259",
"sha256": "92952207dda9a00fe562f753cac870f712069a69645235e7fb22bfdc1e33b3ce"
},
"downloads": -1,
"filename": "spatialsnv-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "acc9339927cbcde58f1deb0ee6a86259",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 11161,
"upload_time": "2024-12-24T13:30:29",
"upload_time_iso_8601": "2024-12-24T13:30:29.540499Z",
"url": "https://files.pythonhosted.org/packages/2a/2c/922990a8ab2fe91b41ce988ff199500682d76adc622f819a8198b1a56408/spatialsnv-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-24 13:30:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "spatialsnv"
}