I have some PET ChIP data that I'm trying to use in MOSAiCS to call peaks. I've aligned it with Bowtie2, then used Picard tools to clean the file (CleanSam.jar), add group (AddOrRepleaceReadGroups.jar) and then Samtools to convert the sam file to bam file and sort and index. Then I use MOSAiCS (version 2.24.0 in R version 3.6):
mosaicsRunAll(chipFile="241_A_S149_L002_R1_001.sort.bam",
controlFile="241_A_in_S137_L002_R1_001.sort.bam",
peakFile="./241_A_ChIP_peaks.gff",
summaryFile="241_A_ChIP_summary.txt",
exploratoryFile="241_A_ChIP_exploratory.pdf",
gofFile="241_A_ChIP_gof.pdf",
byChr=FALSE, useChrfile=FALSE, PET=TRUE, FDR=0.05, fragLen = 200, binSize=200, parallel=TRUE
Info: constructing bin-level files...
------------------------------------------------------------
------------------------------------------------------------
Name of aligned read file: 241_A_S149_L002_R1_001.sort.bam
Aligned read file format: BAM
Directory of processed bin-level files: ./
Construct bin-level files by chromosome? N
Is file for chromosome info provided? N
Data type: Paired-end tag (PET)
------------------------------------------------------------
Use the provided BAM index file.
Chromosome information is extracted from the BAM file.
Info: reading the aligned read file and processing it into bin-level files...
Error in .normarg_seqnames1(seqnames) : 'seqnames' cannot contain NAs
In addition: Warning message:
In constructBins(infile = x[1], fileFormat = x[2], outfileLoc = binfileDir, :
Removing 308640 reads, due to negative read lengths
I have no idea what ".normarg_seqnames1(seqnames) : 'seqnames' cannot contain NAs" means.
Any idea of how to solve this issue? I've used MOSAiCS before for SET data, but never with BAM files.