最开始的错误是这个Unable to open file draft.asm.fasta.near_.500.bed,
这一步是否执行:export PATH=$PATH:/share/work/biosoft/bedtools/
如果执行了,看一下bedtools能不能使用:bedtools -h,如果不能说明你的bedtools不在环境变量里
在用ALLHIC软件挂载的时候,用如下命令:PreprocessSAMs.pl sample.bwa_aln.sam draft.asm.fasta DPNII。但是运行的时候,出现报错。报错如下:
Wed Jul 23 15:32:05 2025: PreprocessSAMs.pl: samtools view -bS sample.bwa_aln.sam -o sample.bwa_aln.bam
2 /share/work/biosoft/ALLHiC/ALLHiC/scripts/PreprocessSAMs.pl sample.bwa_aln.sam draft.asm.fasta DPNII
3
4 Wed Jul 23 16:18:33 2025: PreprocessSAMs.pl: /share/work/biosoft/ALLHiC/ALLHiC/scripts/make_bed_around_RE_site.pl
5
6 make_bed_around_RE_site.pl
7
8 Find all occurrences of a motif in a genome. Make a 'POS' file listing these occurrences, and also a BED file re
9
10 SYNTAX: make_bed_around_RE_site.pl <fasta> <motif> <range>
11 fasta: A fasta file representing a genome (reference or draft assembly.)
12 motif: A motif, typically a restriction site sequence (e.g., HindIII = AAGCTT, NcoI = CCATGG, Dpn1 = GATC).
13 range: A number representing how many bp around the sequence to include. Recommend 500 based on Yaffe & Tanay,
14
15 OUTPUT FILES:
16 <fasta>.near_<motif>.<range>.bed
17 <fasta>.near_pos_of_<motif>.txt
18
19 Wed Jul 23 16:18:33 2025: PreprocessSAMs.pl: bedtools intersect -abam sample.bwa_aln.bam -b draft.asm.fasta.near_
20 Error: Unable to open file draft.asm.fasta.near_.500.bed. Exiting.
21 Wed Jul 23 16:18:33 2025: PreprocessSAMs.pl: samtools view -F12 sample.bwa_aln.REduced.bam -b -o sample.bwa_aln.R
22 [main_samview] fail to read the header from "sample.bwa_aln.REduced.bam".
23 Wed Jul 23 16:18:33 2025: PreprocessSAMs.pl: samtools flagstat sample.bwa_aln.REduced.paired_only.bam > sample.bw
24 [E::hts_open_format] Failed to open file "sample.bwa_aln.REduced.paired_only.bam" : No such file or directory
25 samtools flagstat: Cannot open input file "sample.bwa_aln.REduced.paired_only.bam": No such file or directory